summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2008-06-30 18:59:14 +0200
committerDavid Teigland <teigland@redhat.com>2008-07-14 20:56:59 +0200
commit18c60c0a3b16fc7d6a55497a228602ad8509f838 (patch)
treef963e66eddd4d527790a3d691cbb45e492cd6b0b /fs/dlm
parentdlm: release socket on error (diff)
downloadlinux-18c60c0a3b16fc7d6a55497a228602ad8509f838.tar.xz
linux-18c60c0a3b16fc7d6a55497a228602ad8509f838.zip
dlm: fix uninitialized variable for search_rsb_list callers
gcc 4.3.0 correctly emits the following warning. search_rsb_list does not *r_ret if no dlm_rsb is found and _search_rsb may pass the uninitialized value upstream on the error path when both calls to search_rsb_list return non-zero error. The fix sets *r_ret to NULL on search_rsb_list's not-found path. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 7ba9586a0943..724ddac91538 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -363,6 +363,7 @@ static int search_rsb_list(struct list_head *head, char *name, int len,
if (len == r->res_length && !memcmp(name, r->res_name, len))
goto found;
}
+ *r_ret = NULL;
return -EBADR;
found: