Change in osmo-msc[master]: libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Fri Mar 29 16:43:34 UTC 2019


Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/13450 )

Change subject: libmsc/sms_queue.c: fix memleak in smsq_take_next_sms()
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/13450/2/src/libmsc/sms_queue.c
File src/libmsc/sms_queue.c:

https://gerrit.osmocom.org/#/c/13450/2/src/libmsc/sms_queue.c@233
PS2, Line 233: 			talloc_free(sms);
> sms->receiver is a reference to a vlr_subscr with a use count. You are now leaking that use count. […]
You're right, thanks! Done.


https://gerrit.osmocom.org/#/c/13450/2/tests/sms_queue/sms_queue_test.c
File tests/sms_queue/sms_queue_test.c:

https://gerrit.osmocom.org/#/c/13450/2/tests/sms_queue/sms_queue_test.c@148
PS2, Line 148: 		talloc_free(sms);
> all of these should probably also be sms_free()
Correct. Since sms_free() may call vlr_subscr_put() on our statically allocated 'arbitrary_vsub', I had to ensure a big enough initial arbitrary_vsub.use_count value.



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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iad5e4d84d8d410ea43d5907e9ddf6e5fdb55bc7a
Gerrit-Change-Number: 13450
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Comment-Date: Fri, 29 Mar 2019 16:43:34 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190329/8c94d2a4/attachment.html>


More information about the gerrit-log mailing list