nat: Fix crash (double-free) in forward_sccp_to_msc

In bsc_nat_parse(), parsed is allocated this way:
"""parsed = talloc_zero(msg, struct bsc_nat_parsed);"""
So parsed is a child of msg, and so it's freed when msg is freed.

Since libosmocore c7f52c4c84d6a8898048738c4db9266289c40b45,
osmo_wqueue_enqueue() correctly detects queue full and returns an error,
and then queue_for_msc() calls msgb_free(). Code in osmo-bsc-nat was
probably written before that change in behavior, so that's why probably
the bug was not hit before.

The "if (parsed)" condition is removed since it's actually fine to
talloc_free(NULL).

Related: SYS#4548
Change-Id: I209d3e2d809a67915ec43c874e68f7f746a565f0
1 file changed
tree: 4ee59bfec35815d73561548f04f1bd097bc86d8a
  1. contrib/
  2. debian/
  3. manuals/
  4. openbsc/
  5. .gitignore
  6. .gitreview
  7. .mailmap