From a4d23ed66ff32b5a9dc00ea82036436df0e97505 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 9 Sep 2010 11:10:01 +0200 Subject: lib/util: remove some unused_result warnings. Guenther --- lib/util/util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/util') diff --git a/lib/util/util.c b/lib/util/util.c index c0af4b0116..076ddf47fc 100644 --- a/lib/util/util.c +++ b/lib/util/util.c @@ -899,8 +899,13 @@ void *allocate_anonymous_shared(size_t bufsz) void samba_start_debugger(void) { char *cmd = NULL; - asprintf(&cmd, "xterm -e \"gdb --pid %u\"&", getpid()); - system(cmd); + if (asprintf(&cmd, "xterm -e \"gdb --pid %u\"&", getpid()) == -1) { + return; + } + if (system(cmd) == -1) { + free(cmd); + return; + } free(cmd); sleep(2); } -- cgit