mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libdasd: Free memory for previously used sysfs path
util_path_sysfs() allocates memory for the created path which must be
freed by the user.
Fixes: 8023a72b11 ("libdasd: Provide function to read ese sysfs attribute")
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
@@ -91,6 +91,7 @@ int dasd_sys_ese(char *devnode)
|
||||
|
||||
rc = fgetc(fp) - '0';
|
||||
fclose(fp);
|
||||
free(path);
|
||||
|
||||
return (rc == 1) ? 1 : 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user