[prev in list] [next in list] [prev in thread] [next in thread]
List: openser-devel
Subject: [sr-dev] =?utf-8?q?sip=5Fmsg_structure_and_memory_free?=
From: Konstantin Polyakov <piligrim_pk () mail ! ru>
Date: 2018-05-31 9:54:42
Message-ID: 1527760482.120883825 () f45 ! i ! mail ! ru
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Attachment #4 (text/plain)]
Hello All,
There is a structure sip_msg which is passed into a module and represents a \
received sip message. It contains number of pointers to hdr_field members.
In its turn hdr_field contains member void* parsed
In the sanity module we assign to parsed member a pointer to newly allocated memory \
and we don't free that memory at the end. Do we need to free explicitly or this \
memory will be deallocated later together with sip_msg ?
In other words is it memory leak or not?
Best regards,
Konstantin
[Attachment #5 (text/html)]
<HTML><BODY>Hello All,<br><br>There is a \
structure <strong>sip_msg</strong> which is passed into a module and \
represents a received sip message.<br>It contains number of pointers \
to <strong>hdr_field</strong> members.<br>In its \
turn <strong>hdr_field</strong> contains member <strong>void* \
parsed</strong><br><br>In the sanity module we assign \
to <strong>parsed</strong> member a pointer to newly allocated memory and \
we don't free that memory at the end.<br>Do we need to free explicitly or this memory \
will be deallocated later together with <strong>sip_msg</strong>?<br><br>In \
other words is it memory leak or not?<br><br><br>Best \
regards,<br>Konstantin<br><br><br></BODY></HTML>
[Attachment #6 (text/plain)]
_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic