projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e28bd4
)
datasehhet.c: Fix memory leak
20120724000504/pspp
20120725000503/pspp
20120726000503/pspp
20120727000502/pspp
author
John Darrington
<john@darrington.wattle.id.au>
Mon, 23 Jul 2012 20:45:57 +0000
(22:45 +0200)
committer
John Darrington
<john@darrington.wattle.id.au>
Mon, 23 Jul 2012 20:45:57 +0000
(22:45 +0200)
src/data/datasheet.c
patch
|
blob
|
history
diff --git
a/src/data/datasheet.c
b/src/data/datasheet.c
index b64df14563865875b7d60374f515007d87353b28..1175e20403eeb0fed73cf95a972beddb860766f8 100644
(file)
--- a/
src/data/datasheet.c
+++ b/
src/data/datasheet.c
@@
-509,15
+509,19
@@
datasheet_resize_column (struct datasheet *ds, size_t column, int new_width,
if (!source_read (&old_col, prow, &src))
{
/* FIXME: back out col changes. */
-
return false
;
+
break
;
}
resize_cb (&src, &dst, resize_cb_aux);
if (!source_write (col, prow, &dst))
{
/* FIXME: back out col changes. */
-
return false
;
+
break
;
}
}
+ value_destroy (&src, old_width);
+ value_destroy (&dst, new_width);
+ if (lrow < n_rows)
+ return false;
release_source (ds, old_col.source);
}