[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: memory leak in gpt.c (Fixed the correct way)
From: |
Harley D. Eades III |
Subject: |
Re: memory leak in gpt.c (Fixed the correct way) |
Date: |
Mon, 26 Dec 2005 10:48:00 -0600 |
On Mon, 2005-12-26 at 17:56 +0100, Patrick Leslie Polzer wrote:
> On Mon, 26 Dec 2005 10:34:28 -0600
> Harley D. Eades III <"Harley D. Eades III" <address@hidden>> wrote:
>
> | What is the difference between what I have and a PED_ASSERT? All the
> | PED_ASSERT will do is return if pth is NULL, right? The function as is
> | will not free anything unless there is memory, which is in my mind
> | correct.
> The problem is the crash that will occur when you dereference the pointer in
>
> if (pth->Reserved2)
>
> If pth is NULL, for which you check afterwards (never reached in this case!),
> the program will crash.
>
> As for the assertion, it will throw a fatal exception if it is not fullfilled
> instead of just returning.
Thanks, I just wanted to fully understand.
> HTH,
Yes it does.
-- Harley
-----BEGIN GEEK CODE BLOCK-----
G: GCS-- d- a? C++++ B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+++++
------END GEEK CODE BLOCK------
- memory leak in gpt.c (Fixed the correct way), Harley D. Eades III, 2005/12/23
- Re: memory leak in gpt.c (Fixed the correct way), Patrick Leslie Polzer, 2005/12/23
- Re: memory leak in gpt.c (Fixed the correct way), Harley D. Eades III, 2005/12/23
- Re: memory leak in gpt.c (Fixed the correct way), Harley D. Eades III, 2005/12/26
- Re: memory leak in gpt.c (Fixed the correct way), Patrick Leslie Polzer, 2005/12/26
- Re: memory leak in gpt.c (Fixed the correct way), Håkon Løvdal, 2005/12/26
- Re: memory leak in gpt.c (Fixed the correct way), Patrick Leslie Polzer, 2005/12/26
- Re: memory leak in gpt.c (Fixed the correct way), Harley D. Eades III, 2005/12/26
- Re: memory leak in gpt.c (Fixed the correct way), Patrick Leslie Polzer, 2005/12/26
- Re: memory leak in gpt.c (Fixed the correct way),
Harley D. Eades III <=
- Re: memory leak in gpt.c (Fixed the correct way), Otavio Salvador, 2005/12/26
- Re: memory leak in gpt.c (Fixed the correct way), Harley D. Eades III, 2005/12/26