httpd.c (d5b513f5) httpd.c (44ed0680)
1/* $OpenBSD: httpd.c,v 1.6 2014/07/23 23:10:27 reyk Exp $ */
1/* $OpenBSD: httpd.c,v 1.7 2014/07/24 08:32:36 reyk Exp $ */
2
3/*
4 * Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *

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

715
716 while ((kv = RB_MIN(kvtree, keys)) != NULL)
717 kv_delete(keys, kv);
718}
719
720void
721kv_free(struct kv *kv)
722{
2
3/*
4 * Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *

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

715
716 while ((kv = RB_MIN(kvtree, keys)) != NULL)
717 kv_delete(keys, kv);
718}
719
720void
721kv_free(struct kv *kv)
722{
723 if (kv->kv_type == KEY_TYPE_NONE)
724 return;
725 if (kv->kv_key != NULL) {
726 free(kv->kv_key);
727 }
728 kv->kv_key = NULL;
729 if (kv->kv_value != NULL) {
730 free(kv->kv_value);
731 }
732 kv->kv_value = NULL;

--- 149 unchanged lines hidden ---
723 if (kv->kv_key != NULL) {
724 free(kv->kv_key);
725 }
726 kv->kv_key = NULL;
727 if (kv->kv_value != NULL) {
728 free(kv->kv_value);
729 }
730 kv->kv_value = NULL;

--- 149 unchanged lines hidden ---