RE: Last bogus commit from Stipe

"Paul Keogh" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
IMHO, this feels bad.

If the programmatic logic is correct, then the freed memory cannot be accessed

after it is free.

-----Original Message-----

From: Alexander Malysh [ mailto:[email protected] ]

Sent: Mon 22/01/2007 11:12

To: [email protected]

Subject: Last bogus commit from Stipe

Hi Stipe,

your last commit:

Index: gateway/gwlib/gwmem-native.c

diff -u gateway/gwlib/gwmem-native.c:1.10 gateway/gwlib/gwmem-native.c:1.11

--- gateway/gwlib/gwmem-native.c:1.10 Sun Jan 7 23:52:56 2007

+++ gateway/gwlib/gwmem-native.c Mon Jan 22 02:22:25 2007

@@ -108,6 +108,7 @@

void gw_native_free(void *ptr)

{

free(ptr);

+ ptr = NULL;

}

is bogus and unneeded because you just set ptr to NULL but not pointer af

caller. So this commit does nothing to prevent situation you described and

should be reverted.

--

Thanks,

Alex
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.