Changeset 761886e8e4ca206d5058bc9d259061141249ae2f
- Timestamp:
- 02/25/08 10:24:55
(6 months ago)
- Author:
- Jean-Baptiste Kempf <jb@videolan.org>
- git-committer:
- Jean-Baptiste Kempf <jb@videolan.org> 1203931495 +0000
- git-parent:
[868cd6a7e4ec59c6ffcfbd9466750950c3000f21]
- git-author:
- Jean-Baptiste Kempf <jb@videolan.org> 1203931495 +0000
- Message:
Update - avoid a segfault if the error is triggered before hd creation.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r75d3925 |
r761886e |
|
| 1035 | 1035 | gcry_md_hd_t hd; |
|---|
| 1036 | 1036 | if( gcry_md_open( &hd, GCRY_MD_SHA1, 0 ) ) |
|---|
| 1037 | | goto error; |
|---|
| | 1037 | goto error_hd; |
|---|
| 1038 | 1038 | |
|---|
| 1039 | 1039 | gcry_md_write( hd, psz_version_line, strlen( psz_version_line ) ); |
|---|
| … | … | |
| 1064 | 1064 | { |
|---|
| 1065 | 1065 | msg_Warn( p_update->p_libvlc, "Bad SHA1 hash for status file" ); |
|---|
| 1066 | | goto error; |
|---|
| | 1066 | goto error_hd; |
|---|
| 1067 | 1067 | } |
|---|
| 1068 | 1068 | |
|---|
| … | … | |
| 1071 | 1071 | { |
|---|
| 1072 | 1072 | msg_Err( p_update->p_libvlc, "BAD SIGNATURE for status file" ); |
|---|
| 1073 | | goto error; |
|---|
| | 1073 | goto error_hd; |
|---|
| 1074 | 1074 | } |
|---|
| 1075 | 1075 | else |
|---|
| … | … | |
| 1080 | 1080 | } |
|---|
| 1081 | 1081 | |
|---|
| | 1082 | error_hd: |
|---|
| | 1083 | gcry_md_close( hd ); |
|---|
| 1082 | 1084 | error: |
|---|
| 1083 | | gcry_md_close( hd ); |
|---|
| 1084 | 1085 | if( p_stream ) |
|---|
| 1085 | 1086 | stream_Delete( p_stream ); |
|---|