lkml.org 
[lkml]   [2005]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/8] UML - kfree cleanup
Date
From
Here's a small patch to remove a few unnessesary NULL pointer checks
before kfree() in arch/um/drivers/daemon_user.c

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: linux-2.6.12/arch/um/drivers/daemon_user.c
===================================================================
--- linux-2.6.12.orig/arch/um/drivers/daemon_user.c 2005-06-19 21:11:24.000000000 -0400
+++ linux-2.6.12/arch/um/drivers/daemon_user.c 2005-06-19 21:35:38.000000000 -0400
@@ -157,9 +157,9 @@ static void daemon_remove(void *data)

os_close_file(pri->fd);
os_close_file(pri->control);
- if(pri->data_addr != NULL) kfree(pri->data_addr);
- if(pri->ctl_addr != NULL) kfree(pri->ctl_addr);
- if(pri->local_addr != NULL) kfree(pri->local_addr);
+ kfree(pri->data_addr);
+ kfree(pri->ctl_addr);
+ kfree(pri->local_addr);
}

int daemon_user_write(int fd, void *buf, int len, struct daemon_data *pri)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-20 21:08    [W:0.026 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site