diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c index 4df30aa..853fb86 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -66,10 +66,12 @@ makenewline (unsigned char *data, size_t length) assert (data != NULL); assert (length > 0); - if (!(newline = safemalloc (sizeof (struct bufline_s)))) + newline = safemalloc (sizeof (struct bufline_s)); + if (!newline) return NULL; - if (!(newline->string = safemalloc (length))) + newline->string = safemalloc (length); + if (!newline->string) { safefree (newline); return NULL; |