History

crypto: fix potential double free

Etienne Buira committed 15 years ago

Commit 7d89f7c1 parent 1e9b3021 file · +2 −4Browse files

Unified · Split

libavformat/crypto.c+2−4
@@ -97,8 +97,8 @@ static int crypto_open(URLContext *h, const char *uri, int flags) · 96 unmodified lines
9797
9898 return 0;
9999 err:
100− av_free(c->key);
101− av_free(c->iv);
100+ av_freep(c->key);
101+ av_freep(c->iv);
102102 return ret;
103103 }
104104
@@ -157,8 +157,6 @@ static int crypto_close(URLContext *h) · 52 unmodified lines
157157 if (c->hd)
158158 ffurl_close(c->hd);
159159 av_freep(&c->aes);
160− av_freep(&c->key);
161− av_freep(&c->iv);
162160 return 0;
163161 }
164162

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t