repositories
/
deb_shairplay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1bbd16
)
Fix a small memory leak in raop_buffer.
author
Juho Vähä-Herttua
<juhovh@iki.fi>
Thu, 22 Mar 2012 08:31:32 +0000
(10:31 +0200)
committer
Juho Vähä-Herttua
<juhovh@iki.fi>
Wed, 16 May 2012 21:33:32 +0000
(
00:33
+0300)
src/lib/raop_buffer.c
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/raop_buffer.c
b/src/lib/raop_buffer.c
index 7869d1d53c5d59fd597b7b1159acb50573a0c206..38995c220bd21ae0837461ec75ce46f903aacdeb 100644
(file)
--- 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];
get_fmtp_info(ALACSpecificConfig *config, const char *fmtp)
{
int intarr[12];
+ char *original;
char *strptr;
int i;
/* Parse fmtp string to integers */
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) {
for (i=0; i<12; i++) {
if (strptr == NULL) {
- free(
strptr
);
+ free(
original
);
return -1;
}
intarr[i] = atoi(utils_strsep(&strptr, " "));
}
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];
/* Fill the config struct */
config->frameLength = intarr[1];