All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [patch] dlm: silence a harmless use after free warning
@ 2014-02-05 13:21 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-02-05 13:21 UTC (permalink / raw)
  To: cluster-devel.redhat.com

We pass the freed "r" pointer back to the caller.  It's harmless but it
upsets the static checkers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index e223a911a834..5ec4d60525d8 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -687,6 +687,7 @@ static int find_rsb_dir(struct dlm_ls *ls, char *name, int len,
 		log_error(ls, "find_rsb new from_other %d dir %d our %d %s",
 			  from_nodeid, dir_nodeid, our_nodeid, r->res_name);
 		dlm_free_rsb(r);
+		r = NULL;
 		error = -ENOTBLK;
 		goto out_unlock;
 	}



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [patch] dlm: silence a harmless use after free warning
@ 2014-02-05 13:21 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-02-05 13:21 UTC (permalink / raw)
  To: kernel-janitors

We pass the freed "r" pointer back to the caller.  It's harmless but it
upsets the static checkers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index e223a911a834..5ec4d60525d8 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -687,6 +687,7 @@ static int find_rsb_dir(struct dlm_ls *ls, char *name, int len,
 		log_error(ls, "find_rsb new from_other %d dir %d our %d %s",
 			  from_nodeid, dir_nodeid, our_nodeid, r->res_name);
 		dlm_free_rsb(r);
+		r = NULL;
 		error = -ENOTBLK;
 		goto out_unlock;
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-05 13:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 13:21 [Cluster-devel] [patch] dlm: silence a harmless use after free warning Dan Carpenter
2014-02-05 13:21 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.