]> git.kaiwu.me - klib.git/commitdiff
fixed a potential memory leak
authorHeng Li <lh3@live.co.uk>
Thu, 18 Aug 2011 15:57:54 +0000 (11:57 -0400)
committerHeng Li <lh3@live.co.uk>
Thu, 18 Aug 2011 15:57:54 +0000 (11:57 -0400)
kseq.h

diff --git a/kseq.h b/kseq.h
index 41154d819fd4c9c6f769eab6d5c1e874db590437..c4ebfd319aedb58a61f42f49ab3432df99349724 100644 (file)
--- a/kseq.h
+++ b/kseq.h
@@ -126,7 +126,7 @@ typedef struct __kstring_t {
                                break;                                                                                                  \
                        }                                                                                                                       \
                }                                                                                                                               \
-               if (str->l == 0) {                                                                                              \
+               if (str->s == 0) {                                                                                              \
                        str->m = 1;                                                                                                     \
                        str->s = (char*)calloc(1, 1);                                                           \
                }                                                                                                                               \