Commit:     8910b49fbb8d4517a20bb3de7dc239dcfa7d2b6f
Parent:     4c75f7416f51b0c6855952467a5db04f9c598f09
Author:     Micah Gruber <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 9 11:29:04 2007 +0800
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 17:56:00 2007 -0400

    Fix a potential NULL pointer dereference in free_shared_mem() in 
    This patch fixes a potential null dereference bug where we dereference
    nic before a null check. This patch simply moves the dereferencing
    after the null check.
    Signed-off-by: Micah Gruber < [EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/net/s2io.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index fa29a40..7d54935 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -796,12 +796,14 @@ static void free_shared_mem(struct s2io_nic *nic)
        struct mac_info *mac_control;
        struct config_param *config;
        int lst_size, lst_per_page;
-       struct net_device *dev = nic->dev;
+       struct net_device *dev;
        int page_num = 0;
        if (!nic)
+       dev = nic->dev;
        mac_control = &nic->mac_control;
        config = &nic->config;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to