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:
Jan Höppner
2019-05-21 12:52:16 +02:00
parent cf730a9632
commit 5aec1dc2a1

View File

@@ -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;
}