diff options
author | Alexander Huemer <alexander.huemer@xx.vu> | 2011-10-12 00:29:30 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-08-21 15:34:13 +0200 |
commit | 1d3634e0cb6f226aa9474b08180281ce178cf461 (patch) | |
tree | ec086fa5cd314d6612690ebb85e9f0a3e2fe4e64 | |
parent | 4376bcc1b089920ea454fd773fb35d79dd8a5f14 (diff) |
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
-rw-r--r-- | openbsc/src/libctrl/control_if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libctrl/control_if.c b/openbsc/src/libctrl/control_if.c index 8198ae6b..d0813422 100644 --- a/openbsc/src/libctrl/control_if.c +++ b/openbsc/src/libctrl/control_if.c @@ -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; |