avahi: malloc => xmalloc

git-svn-id: https://svn.musicpd.org/mpd/trunk@5262 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2007-01-14 04:49:26 +00:00
parent 53427fb3d4
commit 298d5ce059

View File

@ -25,6 +25,7 @@
#include "log.h"
#include "listen.h"
#include "ioops.h"
#include "utils.h"
/* The dns-sd service type qualifier to publish */
#define SERVICE_TYPE "_mpd._tcp"
@ -86,7 +87,7 @@ static AvahiTimeout* avahiTimeoutList;
static AvahiWatch* avahiWatchNew( const AvahiPoll *api, int fd, AvahiWatchEvent event, AvahiWatchCallback callback, void *userdata )
{
struct AvahiWatch* newWatch = malloc( sizeof(struct AvahiWatch) );
struct AvahiWatch* newWatch = xmalloc( sizeof(struct AvahiWatch) );
newWatch->fd = fd;
newWatch->requestedEvent = event;
@ -167,7 +168,7 @@ static void avahiTimeoutFree( AvahiTimeout *t )
static AvahiTimeout* avahiTimeoutNew( const AvahiPoll *api, const struct timeval *tv, AvahiTimeoutCallback callback, void *userdata )
{
struct AvahiTimeout* newTimeout = malloc( sizeof(struct AvahiTimeout) );
struct AvahiTimeout* newTimeout = xmalloc( sizeof(struct AvahiTimeout) );
newTimeout->callback = callback;
newTimeout->userdata = userdata;