Martin Ettl <ettl DOT martin AT gmx DOT de>: Fix various resource and memory leaks
[reactos.git] / reactos / base / applications / tsclient / rdesktop / rdesktop.c
index 425ce05..37e5f38 100644 (file)
@@ -1405,7 +1405,10 @@ load_licence(RDPCLIENT * This, unsigned char **data)
                return -1;
 
        if (fstat(fd, &st))
                return -1;
 
        if (fstat(fd, &st))
+       {
+               close(fd);
                return -1;
                return -1;
+       }
 
        *data = (uint8 *) xmalloc(st.st_size);
        length = read(fd, *data, st.st_size);
 
        *data = (uint8 *) xmalloc(st.st_size);
        length = read(fd, *data, st.st_size);