mirror of https://gerrit.osmocom.org/libosmocore
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:
parent
548caef269
commit
b9baf02c12
|
@ -440,6 +440,7 @@ struct gsmtap_inst *gsmtap_source_init(const char *host, uint16_t port,
|
|||
|
||||
rc = osmo_fd_register(>i->wq.bfd);
|
||||
if (rc < 0) {
|
||||
talloc_free(gti);
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue