We need to skip it because librecode has memory leaks.
fortune-debug:
cd fortune && $(MAKE) CC='$(CC)' \
CFLAGS='$(DEBUGCFLAGS) $(REGEXDEFS) -I../util' \
- LDFLAGS='$(DEBUGLDFLAGS)' LIBS='$(REGEXLIBS)'
+ LDFLAGS='$(DEBUGLDFLAGS)' LIBS='$(REGEXLIBS) $(RECODELIBS)'
util-bin:
cd util && $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS)' \
root-check:
perl tests/trailing-space-and-CRs.pl
+tap-check:
+ prove tests/t/*.t
+
check-deps: all
-check: check-deps datfiles-check root-check
+check: check-deps datfiles-check root-check tap-check
clean:
for i in $(SUBDIRS) ; do (cd $$i && $(MAKE) clean); done
// fprintf(stderr, "State mal: %s\n", testpath);
if(stat(testpath, &statbuf) == 0)
fp->utf8_charset = TRUE;
+
+ free (testpath);
+ testpath = NULL;
// fprintf(stderr, "Is utf8?: %i\n", fp->utf8_charset );
fp->parent = parent;
free(path);
do_free(fp->datfile);
do_free(fp->posfile);
+ do_free(fp->name);
+ do_free(fp->path);
if (fp->fd >= 0) close(fp->fd);
free(fp);
return FALSE;
free(path);
do_free(fp->datfile);
do_free(fp->posfile);
+ do_free(fp->name);
+ do_free(fp->path);
if(fp->fd >= 0) close(fp->fd);
free(fp);
return TRUE;
*head = fp;
}
+ if (was_malloc)
+ {
+ free(path);
+ path = NULL;
+ }
+
return TRUE;
}
continue;
name = strdup(dirent->d_name);
if (add_file(NO_PROB, name, fp->path, &fp->child, &tailp, fp))
+ {
fp->num_children++;
- else
- free(name);
+ }
+ free(name);
}
+ closedir(dir);
+ dir = NULL;
if (fp->num_children == 0)
{
/*
fputs((char *)line, stdout);
}
fflush(stdout);
-
- if(fp->utf8_charset) {
- recode_delete_request(request);
- }
}
/*
fortlen();
sleep((unsigned int) max(Fort_len / CPERS, MINW));
}
+
+ recode_delete_request(request);
+ recode_delete_outer(outer);
exit(0);
/* NOTREACHED */
}
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::RunValgrind;
+
+plan skip_all => 'lib-recode has memory leaks';
+# TEST
+Test::RunValgrind->new({})->run(
+ {
+ log_fn => './fortune--1.valgrind-log',
+ prog => './fortune/fortune',
+ argv => [qw//],
+ blurb => 'fortune valgrind test',
+ }
+);
(
$r->basename =~ /\A\..*?\.swp\z/
or
- $r->basename =~ /\.(o|dat)\z/
+ $r->basename =~ /\.(o|dat|valgrind-log)\z/
or
exists($do_not_check{join '/', @{$r->full_components}})
)