]> sjero.net Git - linphone/blobdiff - console/linphonec.c
Merge branch 'master' of git://git.linphone.org/linphone
[linphone] / console / linphonec.c
index fca5a9b86987565c02c4e5914f4a524e13d140d9..60c3c2af11c48256e6af0ccfaa290d702e683b05 100644 (file)
@@ -1400,6 +1400,7 @@ copy_file(const char *from, const char *to)
                snprintf(message, 255, "Can't open %s for writing: %s\n",
                        to, strerror(errno));
                fprintf(stderr, "%s", message);
+               fclose(in);
                return 0;
        }
 
@@ -1408,6 +1409,8 @@ copy_file(const char *from, const char *to)
        {
                if ( ! fwrite(buf, 1, n, out) )
                {
+                       fclose(in);
+                       fclose(out);
                        return 0;
                }
        }