Small optimizations related to memory allocation
* strace (expand_tcbtab): Shorten "out of memory" message.
(rebuild_pollv): Remove unnecessary NULL check before free().
* util.c (dumpstr): Add a comment about likely bug.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
diff --git a/util.c b/util.c
index 9ccc5c9..ec0b3cb 100644
--- a/util.c
+++ b/util.c
@@ -691,6 +691,7 @@
str = malloc(len);
if (str == NULL) {
fprintf(stderr, "out of memory\n");
+ /* BUG! On next call we may use NULL str! */
return;
}
strsize = len;