commit 08e6a73c09429ea67132f3e75ce81e7de95ea8ca
parent e0ee0f141d0ab86fa952c7330328f2009f275f58
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Mon, 23 May 2022 14:48:57 +0200
Fix a possible memory leak on the creation of a line list
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/shtr_lines_list.c b/src/shtr_lines_list.c
@@ -52,6 +52,10 @@ exit:
*out_lines = lnlst;
return res;
error:
+ if(lnlst) {
+ SHTR(lines_list_ref_put(lnlst));
+ lnlst = NULL;
+ }
goto exit;
}