Change in libosmocore[master]: ns2: check if ns_vc_alloc() fails in bind_connect()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Thu Nov 19 02:05:19 UTC 2020


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21242 )


Change subject: ns2: check if ns_vc_alloc() fails in bind_connect()
......................................................................

ns2: check if ns_vc_alloc() fails in bind_connect()

Change-Id: I82c984b9808451a72a62ff03b0495a1d09473e1c
---
M src/gb/gprs_ns2_udp.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/21242/1

diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c
index 0676314..26a0483 100644
--- a/src/gb/gprs_ns2_udp.c
+++ b/src/gb/gprs_ns2_udp.c
@@ -379,6 +379,9 @@
 	struct priv_vc *priv;
 
 	nsvc = ns2_vc_alloc(bind, nse, true);
+	if (!nsvc)
+		return NULL;
+
 	nsvc->priv = talloc_zero(bind, struct priv_vc);
 	if (!nsvc->priv) {
 		gprs_ns2_free_nsvc(nsvc);

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I82c984b9808451a72a62ff03b0495a1d09473e1c
Gerrit-Change-Number: 21242
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201119/3ec6d66e/attachment.htm>


More information about the gerrit-log mailing list