Rizin
unix-like reverse engineering framework and cli tools
zip_fclose.c File Reference
#include <stdlib.h>
#include "zipint.h"

Go to the source code of this file.

Functions

ZIP_EXTERN int zip_fclose (zip_file_t *zf)
 

Function Documentation

◆ zip_fclose()

ZIP_EXTERN int zip_fclose ( zip_file_t zf)

Definition at line 41 of file zip_fclose.c.

41  {
42  int ret;
43 
44  if (zf->src)
45  zip_source_free(zf->src);
46 
47  ret = 0;
48  if (zf->error.zip_err)
49  ret = zf->error.zip_err;
50 
51  zip_error_fini(&zf->error);
52  free(zf);
53  return ret;
54 }
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
ZIP_EXTERN void zip_error_fini(zip_error_t *_Nonnull)
Definition: zip_error.c:52
ZIP_EXTERN void zip_source_free(zip_source_t *_Nullable)
int zip_err
Definition: zip.h:285
zip_source_t * src
Definition: zipint.h:311
zip_error_t error
Definition: zipint.h:309

References zip_file::error, free(), zip_file::src, zip_error::zip_err, zip_error_fini(), and zip_source_free().

Referenced by cat(), do_read(), LLVMFuzzerTestOneInput(), main(), rz_io_zip_slurp_file(), and test_file().