Deleted Added
full compact
geom_xml2tree.c (286719) geom_xml2tree.c (287247)
1/*-
2 * Copyright (c) 2003 Poul-Henning Kamp
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

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

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2003 Poul-Henning Kamp
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

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

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/lib/libgeom/geom_xml2tree.c 286719 2015-08-13 13:19:56Z mav $
29 * $FreeBSD: head/lib/libgeom/geom_xml2tree.c 287247 2015-08-28 06:41:40Z delphij $
30 */
31
32#include <stdio.h>
33#include <inttypes.h>
34#include <stdlib.h>
35#include <string.h>
36#include <unistd.h>
37#include <errno.h>

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

270 else
271 c = &mt->geom->lg_config;
272 gc = calloc(1, sizeof *gc);
273 if (gc == NULL) {
274 mt->error = errno;
275 XML_StopParser(mt->parser, 0);
276 warn("Cannot allocate memory during processing of '%s' "
277 "element", name);
30 */
31
32#include <stdio.h>
33#include <inttypes.h>
34#include <stdlib.h>
35#include <string.h>
36#include <unistd.h>
37#include <errno.h>

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

270 else
271 c = &mt->geom->lg_config;
272 gc = calloc(1, sizeof *gc);
273 if (gc == NULL) {
274 mt->error = errno;
275 XML_StopParser(mt->parser, 0);
276 warn("Cannot allocate memory during processing of '%s' "
277 "element", name);
278 free(p);
278 return;
279 }
280 gc->lg_name = strdup(name);
281 if (gc->lg_name == NULL) {
279 return;
280 }
281 gc->lg_name = strdup(name);
282 if (gc->lg_name == NULL) {
282 free(gc);
283 mt->error = errno;
284 XML_StopParser(mt->parser, 0);
285 warn("Cannot allocate memory during processing of '%s' "
286 "element", name);
283 mt->error = errno;
284 XML_StopParser(mt->parser, 0);
285 warn("Cannot allocate memory during processing of '%s' "
286 "element", name);
287 free(gc);
288 free(p);
287 return;
288 }
289 gc->lg_val = p;
290 LIST_INSERT_HEAD(c, gc, lg_config);
291 return;
292 }
293
294 if (p != NULL) {

--- 235 unchanged lines hidden ---
289 return;
290 }
291 gc->lg_val = p;
292 LIST_INSERT_HEAD(c, gc, lg_config);
293 return;
294 }
295
296 if (p != NULL) {

--- 235 unchanged lines hidden ---