git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1703
d4fa192b-c00b-0410-8231-
f00ffab90ce4
vcc_destroy_source(struct source *sp)
{
+ if (sp->freeit != NULL)
+ free(sp->freeit);
free(sp->name);
free(sp);
}
char *f;
int i;
struct stat st;
+ struct source *sp;
if (fd < 0) {
fd = open(fn, O_RDONLY);
assert(i == st.st_size);
close(fd);
f[i] = '\0';
- return (vcc_new_source(f, f + i, fn));
+ sp = vcc_new_source(f, f + i, fn);
+ sp->freeit = f;
+ return (sp);
}
/*--------------------------------------------------------------------*/
const char *b;
const char *e;
unsigned idx;
+ char *freeit;
};
struct token {