diff options
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-bus/bus-introspect.c | 3 | ||||
-rw-r--r-- | src/libsystemd/sd-hwdb/sd-hwdb.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/libsystemd/sd-bus/bus-introspect.c b/src/libsystemd/sd-bus/bus-introspect.c index 3107d00092..3149a56397 100644 --- a/src/libsystemd/sd-bus/bus-introspect.c +++ b/src/libsystemd/sd-bus/bus-introspect.c @@ -204,8 +204,7 @@ int introspect_finish(struct introspect *i, sd_bus *bus, sd_bus_message *m, sd_b void introspect_free(struct introspect *i) { assert(i); - if (i->f) - fclose(i->f); + safe_fclose(i->f); free(i->introspection); zero(*i); diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c index 06c98314e8..f0316be659 100644 --- a/src/libsystemd/sd-hwdb/sd-hwdb.c +++ b/src/libsystemd/sd-hwdb/sd-hwdb.c @@ -344,8 +344,7 @@ _public_ sd_hwdb *sd_hwdb_unref(sd_hwdb *hwdb) { if (hwdb && REFCNT_DEC(hwdb->n_ref) == 0) { if (hwdb->map) munmap((void *)hwdb->map, hwdb->st.st_size); - if (hwdb->f) - fclose(hwdb->f); + safe_fclose(hwdb->f); free(hwdb->modalias); ordered_hashmap_free(hwdb->properties); free(hwdb); |