← Commit list

b5c33b10b

Denis Vlasenko
Denis Vlasenko
2007-03-12
FAILED Duration: 12s

Subject

chcon: remove redundant ifs: if(p) free(p)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

selinux/chcon.c+2 -5
@@ -97,11 +97,8 @@ static int change_filedir_context(const char *fname, struct stat *stbuf, void *u
rc = TRUE;
}
skip:
- /* FIXME: aren't these work ok on NULL ptr? Remove if() then */
- if (context)
- context_free(context);
- if (file_context)
- freecon(file_context);
+ context_free(context);
+ freecon(file_context);
return rc;
}