done:
free (vm.reorder_vars);
free (vm.rename_vars);
- for (size_t i = 0; i < vm.n_rename; i++)
- free (vm.new_names[i]);
+ if (vm.new_names)
+ for (size_t i = 0; i < vm.n_rename; i++)
+ free (vm.new_names[i]);
free (vm.new_names);
free (vm.drop_vars);
return ret_code;
dnl PSPP - a program for statistical analysis.
-dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2017, 2020 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
modify-variables.sps:17: error: Stopping syntax file processing here to avoid a cascade of dependent command failures.
])
AT_CLEANUP
+
+AT_SETUP([MODIFY VARS crash])
+AT_DATA([modify-variables.sps], [dnl
+DATA LIST notable LIST /a b c (F2.0).
+BEGIN DATA.
+1 2 3
+END DATA.
+
+MODIFY VARS /RENAME (a 4 c = one two three).
+])
+
+AT_CHECK([pspp -O format=csv modify-variables.sps], [1], [ignore])
+
+AT_CLEANUP