Change in osmo-msc[master]: vlr subscr get/put: also check against NULL

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Apr 26 18:55:25 UTC 2019


Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13745 )

Change subject: vlr subscr get/put: also check against NULL
......................................................................

vlr subscr get/put: also check against NULL

Change-Id: I36929a4ba4abb46909181068d1d0af967b1f5a94
---
M include/osmocom/msc/vlr.h
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 92ebda1..ce6a232 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -399,9 +399,9 @@
 #define vlr_subscr_put(VSUB, USE) vlr_subscr_put_src(VSUB, USE, __FILE__, __LINE__)
 
 #define vlr_subscr_get_src(VSUB, USE, SRCFILE, SRCLINE) \
-	OSMO_ASSERT(_osmo_use_count_get_put(&(VSUB)->use_count, USE, 1, SRCFILE, SRCLINE) == 0)
+	OSMO_ASSERT((VSUB) && _osmo_use_count_get_put(&(VSUB)->use_count, USE, 1, SRCFILE, SRCLINE) == 0)
 #define vlr_subscr_put_src(VSUB, USE, SRCFILE, SRCLINE) \
-	OSMO_ASSERT(_osmo_use_count_get_put(&(VSUB)->use_count, USE, -1, SRCFILE, SRCLINE) == 0)
+	OSMO_ASSERT((VSUB) && _osmo_use_count_get_put(&(VSUB)->use_count, USE, -1, SRCFILE, SRCLINE) == 0)
 
 void vlr_subscr_free(struct vlr_subscr *vsub);
 int vlr_subscr_alloc_tmsi(struct vlr_subscr *vsub);

-- 
To view, visit https://gerrit.osmocom.org/13745
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I36929a4ba4abb46909181068d1d0af967b1f5a94
Gerrit-Change-Number: 13745
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190426/23003acc/attachment.html>


More information about the gerrit-log mailing list