aboutsummaryrefslogtreecommitdiff
path: root/src/start-stop-daemon/start-stop-daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/start-stop-daemon/start-stop-daemon.c')
-rw-r--r--src/start-stop-daemon/start-stop-daemon.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/start-stop-daemon/start-stop-daemon.c b/src/start-stop-daemon/start-stop-daemon.c
index 07fab393..c277345d 100644
--- a/src/start-stop-daemon/start-stop-daemon.c
+++ b/src/start-stop-daemon/start-stop-daemon.c
@@ -204,20 +204,20 @@ handle_signal(int sig)
{
int status;
int serrno = errno;
- char *signame = NULL;
+ const char *signame = NULL;
switch (sig) {
case SIGINT:
if (!signame)
- xasprintf(&signame, "SIGINT");
+ signame = "SIGINT";
/* FALLTHROUGH */
case SIGTERM:
if (!signame)
- xasprintf(&signame, "SIGTERM");
+ signame = "SIGTERM";
/* FALLTHROUGH */
case SIGQUIT:
if (!signame)
- xasprintf(&signame, "SIGQUIT");
+ signame = "SIGQUIT";
eerrorx("%s: caught %s, aborting", applet, signame);
/* NOTREACHED */
@@ -236,9 +236,6 @@ handle_signal(int sig)
eerror("%s: caught unknown signal %d", applet, sig);
}
- /* free signame */
- free(signame);
-
/* Restore errno */
errno = serrno;
}