Browse code

tm: t_fifo.c - free app in case of error

Daniel-Constantin Mierla authored on 08/04/2021 09:25:05
Showing 1 changed files
... ...
@@ -214,6 +214,7 @@ int parse_tw_append( modparam_t type, void* val)
214 214
 	app->name.s = (char*)pkg_malloc( foo.len+1 );
215 215
 	if (app->name.s==0) {
216 216
 		PKG_MEM_ERROR;
217
+		pkg_free(app);
217 218
 		goto error;
218 219
 	}
219 220
 	memcpy( app->name.s, foo.s, foo.len);