qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] audio: Fix using freed pointer in wav_fini_out


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] audio: Fix using freed pointer in wav_fini_out
Date: Fri, 13 Jun 2014 08:23:29 +0100

On 13 June 2014 08:15, Markus Armbruster <address@hidden> wrote:
> <address@hidden> writes:
>
>> From: Gonglei <address@hidden>
>>
>> Spotted by Coverity:
>>
>> (8) Event freed_arg:  "fclose(FILE *)" frees "wav->f".
>> (9) Event cond_true:  Condition "fclose(wav->f)", taking true branch
>> Also see events:  [pass_freed_arg]
>>
>> 212         if (fclose (wav->f))  {
>> (10) Event pass_freed_arg:  Passing freed pointer "wav->f" as an argument
>> to function "AUD_log(char const *, char const *, ...)".
>> Also see events:  [freed_arg]
>>
>> 213             dolog ("wav_fini_out: fclose %p failed\nReason: %s\n",
>> 214                    wav->f, strerror (errno));
>
> False positive, because dolog() doesn't dereference wav->f, it only
> prints it.

Yep, I pointed that out last time around...

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]