src/gsmtap_util.c: fix possible memleak in gsmtap_source_init()

In gsmtap_source_init() we dynamically allocate a gsmtap_inst struct,
but don't free it if the subsequent call to osmo_fd_register() fails.

Change-Id: I970b493f3a64fbe9c3f68fcfba5097ee3ff72960
This commit is contained in:
Vadim Yanitskiy 2019-03-24 00:01:27 +07:00
parent 548caef269
commit b9baf02c12
1 changed files with 1 additions and 0 deletions

View File

@ -440,6 +440,7 @@ struct gsmtap_inst *gsmtap_source_init(const char *host, uint16_t port,
rc = osmo_fd_register(&gti->wq.bfd);
if (rc < 0) {
talloc_free(gti);
close(fd);
return NULL;
}