aboutsummaryrefslogtreecommitdiff
path: root/matrix/generic/mmatrix.c
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-06-07 11:55:09 +0800
committerDeterminant <[email protected]>2015-06-07 11:55:09 +0800
commit6e720b961f7edac9c3a41affe0ca40dd0ec9fc85 (patch)
tree19ba0a682f9b75e70e18b796fbe5315ee5953d3a /matrix/generic/mmatrix.c
parent5bcd5d79875587b08d598cc08bd5f8b1f5e14a23 (diff)
fix memory leak in profiling; other minor changes
Diffstat (limited to 'matrix/generic/mmatrix.c')
-rw-r--r--matrix/generic/mmatrix.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/matrix/generic/mmatrix.c b/matrix/generic/mmatrix.c
index 2045d65..b0f0791 100644
--- a/matrix/generic/mmatrix.c
+++ b/matrix/generic/mmatrix.c
@@ -87,15 +87,9 @@ int nerv_matrix_(save)(lua_State *L) {
MATRIX_ELEM *row = MATRIX_ROW_PTR(self, i);
for (j = 0; j < ncol; j++)
if (fprintf(fp, MATRIX_ELEM_WRITE_FMT " ", row[j]) < 0)
- {
- free(self);
return 0;
- }
if (fprintf(fp, "\n") < 0)
- {
- free(self);
return 0;
- }
}
return 0;
}