RE: Potential memory leak in smppbox :: msg_to_pdu

"Rene Kluwen" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
The list was empty already, since gwlist_extract_first has been used for all items.
But true: gwlist_destroy should have been called as well.
I fixed this in the latest revision (11) of smppbox/trunk. Thanks.

The first msgid is special, since it is returned by Kannel. The others are not. That's why I extract it first.

extract_first_msgid() was never used and I removed it from the source.

== Rene

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Victor Luchitz
Sent: donderdag 1 juli 2010 9:41
To: [email protected]
Subject: Potential memory leak in smppbox :: msg_to_pdu

Hello.

There seems to be a memory leak in msg_to_pdu function in smppbox.c

This line:
parts = octstr_split(msg->sms.dlr_url, octstr_imm(";"));

creates a list of octstrings which is never destroyed with a:
gwlist_destroy(parts, octstr_destroy_item);

call. Shouldn't extract_first_msgid be used there anyway?

-- 
Best regards,
 Victor Luchitz
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.