projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix memory leaks.
[pspp-builds.git]
/
src
/
file-type.c
diff --git
a/src/file-type.c
b/src/file-type.c
index 2b11a4abd21ce4deb551a893ad6d2e1a6c7efb41..ec076146c7725a4b9e1880671cba4a130df0b1f2 100644
(file)
--- a/
src/file-type.c
+++ b/
src/file-type.c
@@
-21,6
+21,7
@@
#include "error.h"
#include <stdlib.h>
#include "alloc.h"
#include "error.h"
#include <stdlib.h>
#include "alloc.h"
+#include "case.h"
#include "command.h"
#include "data-in.h"
#include "dfm.h"
#include "command.h"
#include "data-in.h"
#include "dfm.h"
@@
-643,7
+644,7
@@
file_type_source_read (struct case_source *source,
{
struct data_in di;
{
struct data_in di;
- v.c = c
->data[fty->record.v->fv].
s;
+ v.c = c
ase_data_rw (c, fty->record.v->fv)->
s;
data_in_finite_line (&di, ls_c_str (&line), ls_length (&line),
fty->record.fc, fty->record.fc + fty->record.nc);
data_in_finite_line (&di, ls_c_str (&line), ls_length (&line),
fty->record.fc, fty->record.fc + fty->record.nc);
@@
-676,7
+677,7
@@
file_type_source_read (struct case_source *source,
di.format = format;
data_in (&di);
di.format = format;
data_in (&di);
-
memcpy (&c->data[fty->record.v->fv].f, &v.f, sizeof v.f)
;
+
case_data_rw (c, fty->record.v->fv)->f = v.f
;
for (iter = fty->recs_head; iter; iter = iter->next)
{
if (iter->flags & RCT_OTHER)
for (iter = fty->recs_head; iter; iter = iter->next)
{
if (iter->flags & RCT_OTHER)