Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
fddd3f2c
"git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "d4d6ea09e35f1b8800d268d97ce29c7453cae3cc"
Commit
fddd3f2c
authored
Jul 29, 2019
by
Edward Z. Yang
Committed by
Soumith Chintala
Jul 29, 2019
Browse files
Fix segfault passing null to sox_close (#174)
parent
873af313
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
torchaudio/torch_sox.cpp
torchaudio/torch_sox.cpp
+3
-1
No files found.
torchaudio/torch_sox.cpp
View file @
fddd3f2c
...
@@ -18,7 +18,9 @@ struct SoxDescriptor {
...
@@ -18,7 +18,9 @@ struct SoxDescriptor {
SoxDescriptor
&
operator
=
(
const
SoxDescriptor
&
other
)
=
delete
;
SoxDescriptor
&
operator
=
(
const
SoxDescriptor
&
other
)
=
delete
;
SoxDescriptor
&
operator
=
(
SoxDescriptor
&&
other
)
=
delete
;
SoxDescriptor
&
operator
=
(
SoxDescriptor
&&
other
)
=
delete
;
~
SoxDescriptor
()
{
~
SoxDescriptor
()
{
sox_close
(
fd_
);
if
(
fd_
!=
nullptr
)
{
sox_close
(
fd_
);
}
}
}
sox_format_t
*
operator
->
()
noexcept
{
sox_format_t
*
operator
->
()
noexcept
{
return
fd_
;
return
fd_
;
...
...
Write
Preview
Markdown
is supported
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