jack: strdup => xstrdup for error checking

git-svn-id: https://svn.musicpd.org/mpd/trunk@5249 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2007-01-14 02:08:22 +00:00
parent 8a1b85c1a5
commit eb2a02dc2b

View File

@ -166,10 +166,10 @@ static int jack_initDriver(AudioOutput *audioOutput, ConfigParam *param)
if ( ! param ) return 0;
if ( (bp = getBlockParam(param, "ports")) ) {
cp = strdup(bp->value);
cp = xstrdup(bp->value);
ERROR("output_ports=%s\n", cp);
output_ports[0] = strdup(strtok (cp, ","));
output_ports[1] = strdup(strtok (NULL, ","));
output_ports[0] = xstrdup(strtok (cp, ","));
output_ports[1] = xstrdup(strtok (NULL, ","));
free(cp);
}
@ -188,7 +188,7 @@ static int jack_initDriver(AudioOutput *audioOutput, ConfigParam *param)
if ( (bp = getBlockParam(param, "name"))
&& (strcmp(bp->value, "mpd") != 0) ) {
name = strdup(bp->value);
name = xstrdup(bp->value);
ERROR("name=%s\n", name);
}