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
1 file changed
tree: 0c7ab8830a0a439564a4815e4975a67a569e890f
  1. hlrsync/
  2. linux-kernel/
  3. openbsc/
  4. wireshark/
  5. README