cmogstored.git  about / heads / tags
alternative mogstored implementation for MogileFS
blob 4eaa6a4b49bad6710e765efcae6b304b558a1825 431 bytes (raw)
$ git show HEAD:addrinfo.c	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
/*
 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 */
#include "cmogstored.h"

/*
 * mog_listen_parse and mog_cfg_parse generate mog_addrinfo objects internally
 */
void mog_addrinfo_free(struct mog_addrinfo **aptr)
{
	struct mog_addrinfo *a = *aptr;

	if (!a) return;

	*aptr = NULL;
	mog_free(a->orig);
	freeaddrinfo(a->addr);
	free(a);
}

git clone https://yhbt.net/cmogstored.git