session: fix file descriptor leak in rpc_blob_from_file()
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 26 Oct 2013 14:16:29 +0000 (14:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 26 Oct 2013 14:16:29 +0000 (14:16 +0000)
session.c

index e053979b87226fb57562440478a10e674d58e13a..30adf0bb230a354ce8b4f2a0af9467fd26574c37 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1188,6 +1188,8 @@ rpc_blob_from_file(const char *path)
        if (len != blob_pad_len(&head))
                goto fail;
 
+       close(fd);
+
        return attr;
 
 fail: