From b9b7bddb28c85a7cc2340c753f37b21bd7a14dbd Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Thu, 27 Oct 2011 10:38:27 -0400 Subject: [PATCH] policycoreutils: setfiles: fix use before initialized There are code paths where ret can be returned without being initialized Signed-off-by: Eric Paris Acked-by: Dan Walsh --- policycoreutils/setfiles/restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policycoreutils/setfiles/restore.c b/policycoreutils/setfiles/restore.c index 733a6072..9a7d315f 100644 --- a/policycoreutils/setfiles/restore.c +++ b/policycoreutils/setfiles/restore.c @@ -103,7 +103,7 @@ static int match(const char *name, struct stat *sb, char **con) static int restore(FTSENT *ftsent) { char *my_file = strdupa(ftsent->fts_path); - int ret; + int ret = -1; char *context, *newcon; int user_only_changed = 0;