mirror of https://gerrit.osmocom.org/libosmocore
libctrl: only free() msgb if it was alloc()ed
Before this patch a SIGABRT was caused when doing e.g.: $ ncat 127.0.0.1 4249 ^C
This commit is contained in:
parent
4376bcc1b0
commit
1d3634e0cb
|
@ -208,7 +208,7 @@ static int handle_control_read(struct osmo_fd * bfd)
|
|||
struct ctrl_connection *ccon;
|
||||
struct ipaccess_head *iph;
|
||||
struct ipaccess_head_ext *iph_ext;
|
||||
struct msgb *msg;
|
||||
struct msgb *msg = NULL;
|
||||
struct ctrl_cmd *cmd;
|
||||
struct ctrl_handle *ctrl = bfd->data;
|
||||
|
||||
|
|
Loading…
Reference in New Issue