projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1bc341
)
Fix com_lsblob().
author
Andre Noll
<maan@systemlinux.org>
Sat, 22 Sep 2007 11:34:12 +0000
(13:34 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Sat, 22 Sep 2007 11:34:12 +0000
(13:34 +0200)
In case no output was produced, don't access output data and don't free it.
blob.c
patch
|
blob
|
history
diff --git
a/blob.c
b/blob.c
index 559564506e399d39c9a43123745c5941a9ee75da..c6b05b2b803d597de1f5294ba2c54f2790b1ceb6 100644
(file)
--- a/
blob.c
+++ b/
blob.c
@@
-138,9
+138,10
@@
static int com_lsblob(callback_function *f, int fd, int argc, char * const * con
return -E_BLOB_SYNTAX;
ret = send_option_arg_callback_request(&query, argc - i,
argv + i, f, &ls_output);
- if (ret >
= 0 && ls_output.data)
+ if (ret >
0) {
send_buffer(fd, (char *)ls_output.data);
- free(ls_output.data);
+ free(ls_output.data);
+ }
return ret;
}