Skip to content

Commit

Permalink
Must remember to assign the return value of realloc() to a variable. …
Browse files Browse the repository at this point in the history
…Doh.
  • Loading branch information
AlanQuatermain committed Apr 22, 2009
1 parent 458028b commit d119f94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Compression/_AQGzipStreamInternal.m
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ - (void) setInputSize: (NSInteger) inputSize
{
_inputSize = inputSize;
#if TARGET_OS_IPHONE
NSZoneRealloc( [self zone], _input, inputSize );
_input = NSZoneRealloc( [self zone], _input, inputSize );
#else
NSReallocateCollectable( _input, inputSize, 0 );
_input = NSReallocateCollectable( _input, inputSize, 0 );
#endif

_zStream->next_in = _input;
Expand All @@ -198,9 +198,9 @@ - (void) setOutputSize: (NSInteger) outputSize
{
_outputSize = outputSize;
#if TARGET_OS_IPHONE
NSZoneRealloc( [self zone], _output, outputSize );
_output = NSZoneRealloc( [self zone], _output, outputSize );
#else
NSReallocateCollectable( _output, outputSize, 0 );
_output = NSReallocateCollectable( _output, outputSize, 0 );
#endif

_zStream->next_out = _output;
Expand Down

0 comments on commit d119f94

Please sign in to comment.