Use realloc rather than free+malloc.
authorayin <ayin>
Mon, 27 Aug 2007 21:30:50 +0000 (21:30 +0000)
committerayin <ayin>
Mon, 27 Aug 2007 21:30:50 +0000 (21:30 +0000)
src/rxvtutil.C

index a977783b5d6bd557220d47f33cf3c8fa85dfccb8..739848da5742138c582528332c87cc6d1caa32a5 100644 (file)
@@ -1,4 +1,4 @@
-/*--------------------------------*-C-*---------------------------------*
+/*----------------------------------------------------------------------*
  * File:       rxvtutil.C
  *----------------------------------------------------------------------*
  *
@@ -95,8 +95,7 @@ rxvt_temp_buf (int len)
 {
   if (len > temp_len)
     { 
-      free (temp_buf);
-      temp_buf = malloc (len);
+      temp_buf = realloc (temp_buf, len);
       temp_len = len;
     }