Lines Matching refs:cd
49 _zip_cdir_free(zip_cdir_t *cd) in _zip_cdir_free() argument
53 if (!cd) in _zip_cdir_free()
56 for (i=0; i<cd->nentry; i++) in _zip_cdir_free()
57 _zip_entry_finalize(cd->entry+i); in _zip_cdir_free()
58 free(cd->entry); in _zip_cdir_free()
59 _zip_string_free(cd->comment); in _zip_cdir_free()
60 free(cd); in _zip_cdir_free()
67 zip_cdir_t *cd; in _zip_cdir_new() local
70 if ((cd=(zip_cdir_t *)malloc(sizeof(*cd))) == NULL) { in _zip_cdir_new()
76 cd->entry = NULL; in _zip_cdir_new()
77 …else if ((nentry > SIZE_MAX/sizeof(*(cd->entry))) || (cd->entry=(zip_entry_t *)malloc(sizeof(*(cd-… in _zip_cdir_new()
79 free(cd); in _zip_cdir_new()
84 _zip_entry_init(cd->entry+i); in _zip_cdir_new()
86 cd->nentry = cd->nentry_alloc = nentry; in _zip_cdir_new()
87 cd->size = cd->offset = 0; in _zip_cdir_new()
88 cd->comment = NULL; in _zip_cdir_new()
90 return cd; in _zip_cdir_new()