Browse Source

Handled failure to release a mutex lock. Coverity CID 28698.

master
Thomas Schmitt 7 years ago
parent
commit
84c3e88eb3
  1. 9
      xorriso/drive_mgt.c
  2. 2
      xorriso/xorriso_timestamp.h

9
xorriso/drive_mgt.c

@ -2394,7 +2394,7 @@ struct xorriso_md5_state {
int Xorriso__add_spot(struct xorriso_md5_state *state,
int start_lba, int blocks, int quality, int flag)
{
int ret;
int ret, uret;
if(state->chunk != NULL) {
ret= pthread_mutex_lock(&(state->spot_mutex));
@ -2402,8 +2402,11 @@ int Xorriso__add_spot(struct xorriso_md5_state *state,
return(0);
}
ret= Spotlist_add_item(state->spotlist, start_lba, blocks, quality, 0);
if(state->chunk != NULL)
pthread_mutex_unlock(&(state->spot_mutex));
if(state->chunk != NULL) {
uret= pthread_mutex_unlock(&(state->spot_mutex));
if(uret != 0 && ret > 0)
ret= 0;
}
return(ret);
}

2
xorriso/xorriso_timestamp.h

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.13.152751"
#define Xorriso_timestamP "2015.11.13.202241"

Loading…
Cancel
Save