]> git.saurik.com Git - apple/libc.git/blobdiff - stdio/FreeBSD/vfprintf.c
Libc-1158.1.2.tar.gz
[apple/libc.git] / stdio / FreeBSD / vfprintf.c
index 72dd5cc8e3256a7c5bf2b77feea088a84c7538d9..701e2ab9934963351c898254aaae52efe112127b 100644 (file)
@@ -890,11 +890,11 @@ fp_common:
                        if (flags & LONGINT) {
                                wchar_t *wcp;
 
-                               if (convbuf != NULL)
-                                       free(convbuf);
-                               if ((wcp = GETARG(wchar_t *)) == NULL)
+                               free(convbuf);
+                               if ((wcp = GETARG(wchar_t *)) == NULL) {
+                                       convbuf = NULL;
                                        cp = "(null)";
-                               else {
+                               else {
                                        convbuf = __wcsconv(wcp, prec, loc);
                                        if (convbuf == NULL) {
                                                fp->_flags |= __SERR;
@@ -1390,8 +1390,7 @@ error:
        if (dtoaresult != NULL)
                freedtoa(dtoaresult);
 #endif
-       if (convbuf != NULL)
-               free(convbuf);
+       free(convbuf);
        if (__sferror(fp))
                ret = EOF;
        if ((argtable != NULL) && (argtable != statargtable))