X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fraop_buffer.c;h=38995c220bd21ae0837461ec75ce46f903aacdeb;hb=a5670bb87456390a0b5dd8de687793a7f980d492;hp=7869d1d53c5d59fd597b7b1159acb50573a0c206;hpb=d1bbd169e04d1568d45d9ef50394cae4b2059161;p=deb_shairplay.git diff --git a/src/lib/raop_buffer.c b/src/lib/raop_buffer.c index 7869d1d..38995c2 100644 --- a/src/lib/raop_buffer.c +++ b/src/lib/raop_buffer.c @@ -72,20 +72,21 @@ static int get_fmtp_info(ALACSpecificConfig *config, const char *fmtp) { int intarr[12]; + char *original; char *strptr; int i; /* Parse fmtp string to integers */ - strptr = strdup(fmtp); + original = strptr = strdup(fmtp); for (i=0; i<12; i++) { if (strptr == NULL) { - free(strptr); + free(original); return -1; } intarr[i] = atoi(utils_strsep(&strptr, " ")); } - free(strptr); - strptr = NULL; + free(original); + original = strptr = NULL; /* Fill the config struct */ config->frameLength = intarr[1];