lib/sysfs: fix handle leak

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2012-02-01 23:02:21 +01:00
parent e766a3b088
commit 5415374ddf
1 changed files with 1 additions and 0 deletions

View File

@ -409,6 +409,7 @@ char *sysfs_get_slave(struct sysfs_cxt *cxt)
return name;
err:
free(name);
closedir(dir);
return NULL;
}