Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjokeren <robinho364@gmail.com>2017-02-22 04:50:58 +0300
committerSoumith Chintala <soumith@gmail.com>2017-02-23 14:01:13 +0300
commitc29a6e097706fcd22f0ac24c93eb3c9429785e21 (patch)
tree2b2449dc311e44850591ace08d679bfaf2cd0a7f
parentc1dda74ac5ac3787481eb8729ef973c6299b3609 (diff)
Fix THFree in THTensorApply
-rw-r--r--lib/TH/THTensorApply.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/TH/THTensorApply.h b/lib/TH/THTensorApply.h
index 490f871..d069e0d 100644
--- a/lib/TH/THTensorApply.h
+++ b/lib/TH/THTensorApply.h
@@ -272,11 +272,11 @@
TENSOR3##_i = 0; \
} \
} \
- if(TH_TENSOR1_contiguous) \
+ if(!TH_TENSOR1_contiguous) \
THFree(TENSOR1##_counter); \
- if(TH_TENSOR2_contiguous) \
+ if(!TH_TENSOR2_contiguous) \
THFree(TENSOR2##_counter); \
- if(TH_TENSOR3_contiguous) \
+ if(!TH_TENSOR3_contiguous) \
THFree(TENSOR3##_counter); \
}