X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fdictionary.c;h=bca92dabe300b4c34439845c47abf485c900a778;hb=01900114dde51eecc8adc4933ef52289e37c480f;hp=f69d91e3605ed246302740c74e1cb2f47ef3d8f7;hpb=33e610616a2b48f9a7eb56c4ebb0325b66df0376;p=pspp diff --git a/src/data/dictionary.c b/src/data/dictionary.c index f69d91e360..bca92dabe3 100644 --- a/src/data/dictionary.c +++ b/src/data/dictionary.c @@ -81,7 +81,10 @@ void dict_set_encoding (struct dictionary *d, const char *enc) { if (enc) - d->encoding = xstrdup (enc); + { + free (d->encoding); + d->encoding = xstrdup (enc); + } } const char *