aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2007-01-14 04:49:26 +0000
committerEric Wong <normalperson@yhbt.net>2007-01-14 04:49:26 +0000
commit298d5ce059b33b226d7e12f82d4535524566752b (patch)
treef79df3e40d1ec8a85a41f89e34bc3f12551bfd45
parent53427fb3d4723e290cdff04b733736dac0ca15e2 (diff)
downloadmpd-298d5ce059b33b226d7e12f82d4535524566752b.tar.gz
mpd-298d5ce059b33b226d7e12f82d4535524566752b.tar.xz
mpd-298d5ce059b33b226d7e12f82d4535524566752b.zip
avahi: malloc => xmalloc
git-svn-id: https://svn.musicpd.org/mpd/trunk@5262 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/zeroconf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zeroconf.c b/src/zeroconf.c
index 1e2e0eb5f..5417ccb34 100644
--- a/src/zeroconf.c
+++ b/src/zeroconf.c
@@ -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;