mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
cpuplugd: Always free file pointer
The file pointer in the functions is_online() and cpu_is_configured() is only freed in the good case. Make sure it is always freed. Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
@@ -161,8 +161,8 @@ int is_online(int cpuid)
|
||||
retval = 1;
|
||||
if (state == 0)
|
||||
retval = 0;
|
||||
fclose(filp);
|
||||
}
|
||||
fclose(filp);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
@@ -220,8 +220,8 @@ int cpu_is_configured(int cpuid)
|
||||
retval = 1;
|
||||
if (state == 0)
|
||||
retval = 0;
|
||||
fclose(filp);
|
||||
}
|
||||
fclose(filp);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user