tm: t_fifo.c - free app in case of error
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 8 Apr 2021 09:25:05 +0000 (11:25 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Tue, 13 Apr 2021 06:30:05 +0000 (08:30 +0200)
(cherry picked from commit 9c7a509f7189de8ce600a97b7c1c5f9e4f5afdb1)

src/modules/tm/t_fifo.c

index cd3bb29..ea4e96b 100644 (file)
@@ -214,6 +214,7 @@ int parse_tw_append( modparam_t type, void* val)
        app->name.s = (char*)pkg_malloc( foo.len+1 );
        if (app->name.s==0) {
                PKG_MEM_ERROR;
+               pkg_free(app);
                goto error;
        }
        memcpy( app->name.s, foo.s, foo.len);