diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2019-03-16 23:33:41 +0100 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2019-03-16 23:37:45 +0100 |
| commit | 9edf5f3c8a0e6e402d51ed04545a67ba94d6b5cd (patch) | |
| tree | 3268a031ec08699127e7a5c977327ab09b476487 /src/cc4group.c | |
| parent | c970fee092b5a70b6a3b7868cd8b43a98c826070 (diff) | |
| download | cc4group-9edf5f3c8a0e6e402d51ed04545a67ba94d6b5cd.tar.gz cc4group-9edf5f3c8a0e6e402d51ed04545a67ba94d6b5cd.zip | |
Also call deinitCallback in openWithReadCallback in error cases
Diffstat (limited to 'src/cc4group.c')
| -rw-r--r-- | src/cc4group.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cc4group.c b/src/cc4group.c index 0bc1029..9415dd1 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -653,14 +653,6 @@ static bool cc4group_uncompressGroup(CC4Group* const this, CC4Group_ReadCallback goto ret; } - if(deinitCallback != NULL) - { - if(!deinitCallback(callbackArg)) - { - fprintf(stderr, "WARNING: cc4group_uncompressGroup: the deinitCallback failed\n"); - } - } - if(strm.avail_in > 0 || ret != Z_STREAM_END) { SET_MALFORMED_MESSAGE_ERROR("The group contents are read completely but more data is left to read"); @@ -670,6 +662,14 @@ static bool cc4group_uncompressGroup(CC4Group* const this, CC4Group_ReadCallback retData = uncompressedData; ret: + if(deinitCallback != NULL) + { + if(!deinitCallback(callbackArg)) + { + fprintf(stderr, "WARNING: cc4group_uncompressGroup: the deinitCallback failed\n"); + } + } + if(readData != NULL) { cc4group_applyMemoryManagementEnd(memoryManagement, readData); |
