lh3/seqtk — pull request #30 by bwlang (2014-03-03 15:11:28+00:00)
Title: Only test for successful buffer allocation if a buffer needs to be allocated

re: #29

No buffer is allocated when using fractions of original reads (instead of a targeted number of reads), so the alloc always fails when using fractions.

Not sure if you'll want check before free at the bottom... I don't think it is needed, just for clarity/future.