openwrt-packages/net/uwsgi/patches/004-core-alarm_fix_memory_l...

21 lines
595 B
Diff

From bad0edfc10a80de908a3d83c7f075eff8df3a691 Mon Sep 17 00:00:00 2001
From: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Date: Wed, 14 Jan 2015 21:19:24 +0100
Subject: [PATCH] core/alarm: fix memory leak
Reported by Coverity as CID #971006
---
core/alarm.c | 1 +
1 file changed, 1 insertion(+)
--- a/core/alarm.c
+++ b/core/alarm.c
@@ -171,6 +171,7 @@ static int uwsgi_alarm_log_add(char *ala
ual = uwsgi_calloc(sizeof(struct uwsgi_alarm_log));
if (uwsgi_regexp_build(regexp, &ual->pattern, &ual->pattern_extra)) {
+ free(ual);
return -1;
}
ual->negate = negate;