Re: [PATCH] staging: tidspbridge: Fix potential NULL pointer dereference

2013-06-12 Thread Emil Goode
Thank you Dan! That's right, It's of course not NULL after freed. Yes the code looks strange here, I'm not sure what was intended. Best regards, Emil On Wed, Jun 12, 2013 at 08:08:17AM -0700, Dan Carpenter wrote: > 1) This patch doesn't do anything. "dcd_key" points to freed memory > but it's n

Re: [PATCH] staging: tidspbridge: Fix potential NULL pointer dereference

2013-06-12 Thread Dan Carpenter
1) This patch doesn't do anything. "dcd_key" points to freed memory but it's not a NULL pointer. 2) The original pointer doesn't dereference "dcd_key" it just takes the address of one of the elements. I don't know the context and can't say for sure that it's a wrong thing to do. The code does lo

[PATCH] staging: tidspbridge: Fix potential NULL pointer dereference

2013-06-12 Thread Emil Goode
We free dcd_key on line 897 and then dereference it a few lines below. This patch adds a NULL check to make sure we can use dcd_key. Signed-off-by: Emil Goode --- drivers/staging/tidspbridge/rmgr/dbdcd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/tidsp