command.def: Disallow DATASET commands inside INPUT PROGRAM, FILE TYPE.
[pspp] / src / language / stats / factor.c
index 36a49d31b7384ffa2afc2d81e2883972e3d4027a..f3933268431c646e70ed741fd74b7856567ab011 100644 (file)
@@ -813,7 +813,6 @@ static bool run_factor (struct dataset *ds, const struct cmd_factor *factor);
 int
 cmd_factor (struct lexer *lexer, struct dataset *ds)
 {
-  bool extraction_seen = false;
   const struct dictionary *dict = dataset_dict (ds);
 
   struct cmd_factor factor;
@@ -998,7 +997,6 @@ cmd_factor (struct lexer *lexer, struct dataset *ds)
        }
       else if (lex_match_id (lexer, "EXTRACTION"))
        {
-         extraction_seen = true;
           lex_match (lexer, T_EQUALS);
           while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH)
            {
@@ -1737,6 +1735,7 @@ do_factor (const struct cmd_factor *factor, struct casereader *r)
   if (idata->cov == NULL)
     {
       msg (MW, _("The dataset contains no complete observations. No analysis will be performed."));
+      covariance_destroy (cov);
       goto finish;
     }