summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-introspect.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-09 15:20:10 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 15:26:11 +0200
commit74ca738f6a01fb5fc19c5c3899f5cb1fdc1d7f68 (patch)
tree920d0abca454976756296d982d1cb9ef794e1ade /src/libsystemd/sd-bus/bus-introspect.c
parent9c00a6adfa6c2ded071222b2ec76295480add34e (diff)
util: introduce safe_fclose() and port everything over to it
Adds a coccinelle script to port things over automatically.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-introspect.c')
-rw-r--r--src/libsystemd/sd-bus/bus-introspect.c3
1 files changed, 1 insertions, 2 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);