From: Guus Sliepen Date: Wed, 14 May 2014 21:06:23 +0000 (+0200) Subject: Fix a filedescriptor leak. X-Git-Url: http://git.meshlink.io/?a=commitdiff_plain;h=02e5ceb9075f31d418726a3120efc876cf7925d9;hp=3be16f18501d184af8c8cc1a7335fbc74d088b1b;p=meshlink Fix a filedescriptor leak. Found by cppcheck. --- diff --git a/src/meshlink.c b/src/meshlink.c index c88059b1..62eda6da 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -426,6 +426,7 @@ static bool finalize_join(meshlink_handle_t *mesh) { FILE *fh = fopen(filename, "w"); if(!fh) { fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno)); + fclose(f); return false; }