Skip to contentSkip to conversation

Fix: return NULL pointer on memory allocation failure

PATCH Jérémie Galarneau 1 participant 1 message May 9, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Merged in master and stable-2.10, thanks!

Jérémie

Quoted 21 lines · Mathieu Desnoyers
---
 src/common/buffer-usage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/common/buffer-usage.c +1 -2
index 49696a3..dfe0d85 100644
@@ -231,7 +231,7 @@ struct lttng_condition *lttng_condition_buffer_usage_create(
 
        condition = zmalloc(sizeof(struct lttng_condition_buffer_usage));
        if (!condition) {
-               goto end;
+               return NULL;
        }
 
        lttng_condition_init(&condition->parent, type);
--

2.1.4

Signature · 7 lines
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev