From 4753296c012f9eb90188a4313fb8f797b3f14010 Mon Sep 17 00:00:00 2001 From: Pantelis Kolatsis Date: Fri, 21 Apr 2023 17:43:25 +0000 Subject: [PATCH] topoh: improve mem error handling --- src/modules/topoh/topoh_mod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/topoh/topoh_mod.c b/src/modules/topoh/topoh_mod.c index c1b2dc51e93..c508b16f6a1 100644 --- a/src/modules/topoh/topoh_mod.c +++ b/src/modules/topoh/topoh_mod.c @@ -219,6 +219,7 @@ static int mod_init(void) th_uri_prefix.s = (char*)pkg_malloc(th_uri_prefix.len+1); if(th_uri_prefix.s==NULL) { + pkg_free(th_via_prefix.s); PKG_MEM_ERROR_FMT("uri prefix parameter\n"); goto error; }