From 75e4ab05e44c0bdccc91444ad0eff08b36ad0d03 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 11 May 2018 15:02:26 +1000 Subject: [PATCH] utils: fix leak in kv_double_from_string() We need to free 'pairs' here, do so by jumping to the error label. Signed-off-by: Peter Hutterer --- src/libinput-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libinput-util.h b/src/libinput-util.h index 50d36e7..c675971 100644 --- a/src/libinput-util.h +++ b/src/libinput-util.h @@ -591,7 +591,7 @@ kv_double_from_string(const char *string, npairs++; if (npairs == 0) - return -1; + goto error; result = zalloc(npairs * sizeof *result); -- 2.7.4