aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nerv/lib/matrix/generic/matrix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nerv/lib/matrix/generic/matrix.c b/nerv/lib/matrix/generic/matrix.c
index 5dbad48..e4afa37 100644
--- a/nerv/lib/matrix/generic/matrix.c
+++ b/nerv/lib/matrix/generic/matrix.c
@@ -12,7 +12,10 @@ static void nerv_matrix_(data_free)(Matrix *self, Status *status) {
free(self->data_ref);
free(self);
}
- else NERV_SET_STATUS(status, NERV_NORMAL, 0);
+ else {
+ free(self);
+ NERV_SET_STATUS(status, NERV_NORMAL, 0);
+ }
}
static void nerv_matrix_(data_retain)(Matrix *self) {