Beginning of VFM cleanup.
[pspp-builds.git] / src / vars-atr.c
index ee4d230246c6e233d68a52e65b8de7f97b60a897..00453767b2aefaea346363a1eab1f5294e9bf6ca 100644 (file)
@@ -55,9 +55,11 @@ discard_variables (void)
 
   n_lag = 0;
   
-  if (vfm_source)
+  if (vfm_source != NULL)
     {
-      vfm_source->destroy_source ();
+      if (vfm_source->class->destroy != NULL)
+        vfm_source->class->destroy (vfm_source);
+      free (vfm_source);
       vfm_source = NULL;
     }