From c10218eb3b428eae1e961983d6911cfeecb403a1 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Mon, 23 Feb 2015 01:19:54 +0100 Subject: [PATCH] Fix for coverity #29369 --- external/obstack/obstack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/external/obstack/obstack.c b/external/obstack/obstack.c index 7f51a271f4f..15e2bc1ea39 100644 --- a/external/obstack/obstack.c +++ b/external/obstack/obstack.c @@ -136,8 +136,10 @@ _obstack_begin (struct obstack *h, h->use_extra_arg = 0; chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); - if (!chunk) + if (!chunk) { (*obstack_alloc_failed_handler) (); + return 0; + } h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents, alignment - 1); h->chunk_limit = chunk->limit