Deleted Added
full compact
archive_read_extract.c (228763) archive_read_extract.c (228773)
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "archive_platform.h"
1/*-
2 * Copyright (c) 2003-2007 Tim Kientzle
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "archive_platform.h"
27__FBSDID("$FreeBSD: head/contrib/libarchive/libarchive/archive_read_extract.c 228763 2011-12-21 11:13:29Z mm $");
27__FBSDID("$FreeBSD: head/contrib/libarchive/libarchive/archive_read_extract.c 228773 2011-12-21 15:18:52Z mm $");
28
29#ifdef HAVE_SYS_TYPES_H
30#include <sys/types.h>
31#endif
32#ifdef HAVE_ERRNO_H
33#include <errno.h>
34#endif
35#ifdef HAVE_STDLIB_H

--- 132 unchanged lines hidden (view full) ---

168/*
169 * Cleanup function for archive_extract.
170 */
171static int
172archive_read_extract_cleanup(struct archive_read *a)
173{
174 int ret = ARCHIVE_OK;
175
28
29#ifdef HAVE_SYS_TYPES_H
30#include <sys/types.h>
31#endif
32#ifdef HAVE_ERRNO_H
33#include <errno.h>
34#endif
35#ifdef HAVE_STDLIB_H

--- 132 unchanged lines hidden (view full) ---

168/*
169 * Cleanup function for archive_extract.
170 */
171static int
172archive_read_extract_cleanup(struct archive_read *a)
173{
174 int ret = ARCHIVE_OK;
175
176#if ARCHIVE_API_VERSION > 1
177 ret =
178#endif
179 archive_write_finish(a->extract->ad);
176 ret = archive_write_free(a->extract->ad);
180 free(a->extract);
181 a->extract = NULL;
182 return (ret);
183}
177 free(a->extract);
178 a->extract = NULL;
179 return (ret);
180}