Sami Kerola <kerolasa@xxxxxx> writes: > Found with scan-build. > > Signed-off-by: Sami Kerola <kerolasa@xxxxxx> > --- > lib/loopdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/loopdev.c b/lib/loopdev.c > index 9ae61da..ca5d2f4 100644 > --- a/lib/loopdev.c > +++ b/lib/loopdev.c > @@ -460,6 +460,7 @@ static int loop_scandir(const char *dirname, int **ary, int hasprefix) > tmp = realloc(*ary, arylen * sizeof(int)); > if (!tmp) { > free(*ary); > + ary = NULL; This cannot have any effect. Probably you wanted *ary = NULL; > closedir(dir); > return -1; > } -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html