diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-02-23 07:20:33 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-02-23 07:20:33 +0100 |
commit | a962c90543955bac98308c1b0d909048070d900a (patch) | |
tree | 70b06851187e6bf8cfd8ee28931bdea25ea92ac7 /pcilib/property.c | |
parent | 055279e09c3db9429e02874ec9620b9af357c80a (diff) | |
parent | 52eb7f4fb76ddf99dedf44332aae7af4df76ab36 (diff) | |
download | pcitool-a962c90543955bac98308c1b0d909048070d900a.tar.gz pcitool-a962c90543955bac98308c1b0d909048070d900a.tar.bz2 pcitool-a962c90543955bac98308c1b0d909048070d900a.tar.xz pcitool-a962c90543955bac98308c1b0d909048070d900a.zip |
Merge Python scripting support from Vasiliy Chernov
Diffstat (limited to 'pcilib/property.c')
-rw-r--r-- | pcilib/property.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pcilib/property.c b/pcilib/property.c index a7d1a61..dfab9a6 100644 --- a/pcilib/property.c +++ b/pcilib/property.c @@ -165,7 +165,6 @@ pcilib_property_info_t *pcilib_get_property_list(pcilib_t *ctx, const char *bran continue; } - dir = (struct dir_hash_s*)malloc(sizeof(struct dir_hash_s)); if (!dir) { err = PCILIB_ERROR_MEMORY; @@ -226,6 +225,10 @@ pcilib_property_info_t *pcilib_get_property_list(pcilib_t *ctx, const char *bran }; } + HASH_ITER(hh, dir_hash, dir, dir_tmp) { + HASH_DEL(dir_hash, dir); + free(dir); + } HASH_CLEAR(hh, dir_hash); memset(&info[pos], 0, sizeof(pcilib_property_info_t)); |