fclose(NULL) dereferences its argument -> sigsegv. Signed-off-by: Jan Safranek <jsafr...@redhat.com> ---
src/api.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.c b/src/api.c index e443ad5..71cec93 100644 --- a/src/api.c +++ b/src/api.c @@ -1313,9 +1313,9 @@ static int cg_set_control_value(char *path, const char *val) free(tasks_path); return ECGROUPSUBSYSNOTMOUNTED; } + } else { + fclose(control_file); } - - fclose(control_file); free(tasks_path); return ECGROUPNOTALLOWED; } ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel