elua: fclose before realpath
authorDaniel Kolesa <d.kolesa@samsung.com>
Fri, 30 May 2014 08:53:32 +0000 (09:53 +0100)
committerDaniel Kolesa <d.kolesa@samsung.com>
Tue, 10 Jun 2014 14:48:52 +0000 (15:48 +0100)
src/bin/elua/io.c

index 6f2e0e2..3659c1d 100644 (file)
@@ -15,12 +15,12 @@ get_cmdline_from_argv(const char *fname, const char **argv)
    if  (!testf)
       return NULL;
 
+   fclose(testf);
+
    /* for windows, we have realpath in evil, no need for GetFullPathName */
    if (!realpath(fname, pbuf))
       return NULL;
 
-   fclose(testf);
-
    buf = eina_strbuf_new();
    eina_strbuf_append_char(buf, '"');
    eina_strbuf_append(buf, pbuf);