sndcp: fixup for coverity scan defect CID 149097

Coverity scan detects a Null pointer deref (FORWARD_NULL) in
gprs_sndcp_comp.c: 67 in gprs_sndcp_comp_create().

The reason for this is that gprs_sndcp_dcomp_init() and also
gprs_sndcp_pcomp_init() rely on the comp_entity->algo algo
flag. If the program logic is correct a null pointer deref
should never occur.

This commit adds OSMO_ASSERT() statements to ensure a null
pointer deref is catched if if the ...comp_init() functions
are used with incorrect parameters.

Change-Id: I7748f06d1739a697edad5100a031e5aa1ef11ed1
2 files changed
tree: 59ee2706d8cf7391b977bf6305c699efefde358f
  1. contrib/
  2. debian/
  3. openbsc/
  4. .gitignore
  5. .gitreview
  6. .mailmap