From: Ben Pfaff Date: Mon, 25 May 2009 02:36:01 +0000 (-0700) Subject: sys-file-reader: Fix memory leak. X-Git-Tag: v0.7.3~77 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17c302ddd46683b6251f52e1d6dd6de5099d5abb;p=pspp-builds.git sys-file-reader: Fix memory leak. --- diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index cff462ac..5a840279 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -784,7 +784,7 @@ read_extension_record (struct sfm_reader *r, struct dictionary *dict, /* New in SPSS 16. Contains a single string that describes the character encoding, e.g. "windows-1252". */ { - char *encoding = xcalloc (size, count + 1); + char *encoding = pool_calloc (r->pool, size, count + 1); read_string (r, encoding, count + 1); dict_set_encoding (dict, encoding); return;