Skip to contentSkip to conversation

dlm: silence a harmless use after free warning

PATCH New Dan Carpenter 1 participant 1 message Feb 5, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dlm: silence a harmless use after free warning

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

fs/dlm/lock.c +1 -0
index e223a911a834..5ec4d60525d8 100644
@@ -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;
 	}