Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
1df4908a
Commit
1df4908a
authored
Sep 15, 2014
by
Ivica Bukvic
Browse files
*properly fixed invalid pointer access in the s_audio_alsa.c
parent
8830e84e
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/s_audio_alsa.c
View file @
1df4908a
...
...
@@ -839,7 +839,7 @@ void alsa_getdevs(char *indevlist, int *nindevs,
while
(
!
snd_card_next
(
&
cardno
)
&&
cardno
>=
0
)
{
snd_ctl_t
*
ctl
;
snd_ctl_card_info_t
*
info
;
snd_ctl_card_info_t
*
info
=
NULL
;
char
devname
[
80
];
const
char
*
desc
;
if
(
2
*
ndev
+
2
>
maxndev
)
...
...
@@ -854,7 +854,6 @@ void alsa_getdevs(char *indevlist, int *nindevs,
snd_ctl_card_info_malloc
(
&
info
);
snd_ctl_card_info
(
ctl
,
info
);
desc
=
snd_ctl_card_info_get_name
(
info
);
//snd_ctl_card_info_free(info);
}
else
{
...
...
@@ -867,6 +866,11 @@ void alsa_getdevs(char *indevlist, int *nindevs,
sprintf
(
outdevlist
+
2
*
ndev
*
devdescsize
,
"%s (hardware)"
,
desc
);
sprintf
(
outdevlist
+
(
2
*
ndev
+
1
)
*
devdescsize
,
"%s (plug-in)"
,
desc
);
ndev
++
;
if
(
info
)
{
snd_ctl_card_info_free
(
info
);
info
=
NULL
;
}
}
for
(
i
=
0
,
j
=
2
*
ndev
;
i
<
alsa_nnames
;
i
++
,
j
++
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment