summaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gb_proxy_patch.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-08-26 10:01:57 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-08-29 08:50:40 +0200
commitecbd56c625e81a00556026d996c97ed762a1dfd1 (patch)
tree971da3fce17b8c42b66ee04bfdf724e8f859c60f /openbsc/src/gprs/gb_proxy_patch.c
parent3ba3cf85e1f779b3c42547df4f840d3dcbb89267 (diff)
gbproxy: Fix issues found by Coverity
gbproxy_patch_bssgp: Move a check for tlli_info in front of the first conditional that depends on it, and return immediately if it is NULL. gbproxy_register_tlli: Initialize tlli_already_known to 0. Fixes: Coverity CID 1232691 Fixes: Coverity CID 1232692 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gb_proxy_patch.c')
-rw-r--r--openbsc/src/gprs/gb_proxy_patch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gb_proxy_patch.c b/openbsc/src/gprs/gb_proxy_patch.c
index 35355ba..32e844e 100644
--- a/openbsc/src/gprs/gb_proxy_patch.c
+++ b/openbsc/src/gprs/gb_proxy_patch.c
@@ -335,7 +335,10 @@ void gbproxy_patch_bssgp(struct msgb *msg, uint8_t *bssgp, size_t bssgp_len,
goto patch_error;
}
- if (parse_ctx->tlli_enc && tlli_info) {
+ if (!tlli_info)
+ return;
+
+ if (parse_ctx->tlli_enc) {
uint32_t tlli = gbproxy_map_tlli(parse_ctx->tlli,
tlli_info, parse_ctx->to_bss);