| To: | Arkadiusz Miskiewicz <arekm@xxxxxxxx> |
|---|---|
| Subject: | Re: libattr - severe memory leaks from attr_copy_file() |
| From: | Timothy Shimmin <timothy.shimmin@xxxxxxxxx> |
| Date: | Wed, 18 Feb 2009 18:08:26 +1100 |
| Cc: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+06c88vZXMvNT5nqPVHD/x8BYPwpf4ByuEfrU9ju+wA=; b=gJuokVpb0G2zbia6uvpyMfN7/208YYJipcoxnv0TLqlu52ZsxcgHNUgTMhko85WMQ0 GSpI00OLAvRor6cbpoOmztO19AtsRzSi2g108qIF82SVl1kjvjhZ/DQk9qPz3a79QAlm 7gL64iCL8eMX4/5Xh8fY5mRSU5a1+NcrhdWdA= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=DsfDX60IOqjYANPcEAC7lSbNxM+ao9sEx46p9ag1ZlarqTvhAWod8mizkQDFPWduVG Cw07YIjfE7rutZnaTjzdOtxbG7fyjJetPzyyWFXYpPLg5Wd0+tX1lJ27eO/Wcn8ZFGv8 6N8d4hVnr4COepl3HbuAz2OBevfU7KESXZig8= |
| In-reply-to: | <200902171304.18661.arekm@xxxxxxxx> |
| References: | <499AA47A.2050106@xxxxxxxxxx> <200902171304.18661.arekm@xxxxxxxx> |
On Tue, Feb 17, 2009 at 11:04 PM, Arkadiusz Miskiewicz <arekm@xxxxxxxx> wrote: > > On Tuesday 17 of February 2009, Zdenek Prikryl wrote: > > - free(text); > > + if (text) > > + free(text); > > free(NULL) is fine (on Linux at least) Exactly - in most implementations for free I would say NULL is just fine. And the variable, text, is assigned straight away before any use, so I missed where the problem is. --Tim |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] xfsdump: fix system() error reporting, Timothy Shimmin |
|---|---|
| Next by Date: | Re: xfs problems (possibly after upgrading from linux kernel 2.6.27.10 to .14), Dave Chinner |
| Previous by Thread: | Re: libattr - severe memory leaks from attr_copy_file(), Arkadiusz Miskiewicz |
| Next by Thread: | Re: libattr - severe memory leaks from attr_copy_file(), Zdenek Prikryl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |