git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1aa9eb
)
lib/util: remove some unused_result warnings.
author
Günther Deschner
<gd@samba.org>
Thu, 9 Sep 2010 09:10:01 +0000
(11:10 +0200)
committer
Günther Deschner
<gd@samba.org>
Thu, 9 Sep 2010 09:11:04 +0000
(11:11 +0200)
Guenther
lib/util/util.c
patch
|
blob
|
history
diff --git
a/lib/util/util.c
b/lib/util/util.c
index c0af4b0116244bf0b170585eca760219337d2315..076ddf47fc5e4458fd3959e1586940e14206e243 100644
(file)
--- 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);
}