Skip to content

Commit

Permalink
In sqReadData_encode2bit(), allocate chunk memory only if the inout p…
Browse files Browse the repository at this point in the history
…ointer is NULL.
  • Loading branch information
brianwalenz committed Feb 12, 2019
1 parent dbf63ed commit 67dd703
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stores/sqStoreEncode.C
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ sqReadData::sqReadData_encode2bit(uint8 *&chunk, char *seq, uint32 seqLen) {

uint32 chunkLen = 0;

chunk = new uint8 [ seqLen / 4 + 1];
if (chunk == NULL)
chunk = new uint8 [ seqLen / 4 + 1];

for (uint32 ii=0; ii<seqLen; ) {
uint8 byte = 0;
Expand Down

0 comments on commit 67dd703

Please sign in to comment.