Skip to content

Commit

Permalink
avoid double free with old libav
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@4124 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 9, 2013
1 parent 44a5adf commit 068fdfb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion debian/patches/old-libav.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Index: xpra/codecs/dec_avcodec/decoder.pyx
if self.frame!=NULL:
- avcodec_free_frame(&self.frame)
- #redundant: self.frame = NULL
+ free(&self.frame)
+ #free(&self.frame) #freeing here causes a double free on Ubuntu, avcodec_close probably does it too
+ self.frame = NULL

cdef unsigned long ctx_key #@DuplicatedSignature
Expand Down
2 changes: 1 addition & 1 deletion src/patches/old-libav.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Index: xpra/codecs/dec_avcodec/decoder.pyx
if self.frame!=NULL:
- avcodec_free_frame(&self.frame)
- #redundant: self.frame = NULL
+ free(&self.frame)
+ #free(&self.frame) #freeing here causes a double free on Ubuntu, avcodec_close probably does it too
+ self.frame = NULL

cdef unsigned long ctx_key #@DuplicatedSignature
Expand Down

0 comments on commit 068fdfb

Please sign in to comment.