Deallocate memory from pool using the correct function
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 30 Jul 2010 21:41:01 +0000 (23:41 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 30 Jul 2010 21:41:01 +0000 (23:41 +0200)
Memory allocated using pool_alloc was being deallocated using
the standard free function instead of pool_free.  This change
fixes that.  Thanks to Andras Muranyi for reporting this problem.

src/libpspp/i18n.c

index 0e9b2b1b3863bf6326d238d7f9508aefb17f8894..02aefb5b51256d201bde172a60bc4b100ccae7f8 100644 (file)
@@ -177,7 +177,7 @@ recode_string_pool (const char *to, const char *from,
              }
            /* Fall through */
          case E2BIG:
-           free (outbuf);
+           pool_free (pool, outbuf);
            outbufferlength <<= 1;
            outbuf = pool_malloc (pool, outbufferlength);
            op = outbuf;