(libT) #5276 'regression in nightly: assert (tr_sessionIsLocked (session))': fix the bug; tests now pass again

This commit is contained in:
Jordan Lee 2013-02-06 05:52:41 +00:00
parent 3eff07dde4
commit 836fcc31d2
1 changed files with 2 additions and 0 deletions

View File

@ -2964,6 +2964,7 @@ setLocation (void * vdata)
const bool do_move = data->move_from_old_location;
const char * location = data->location;
double bytesHandled = 0;
tr_torrentLock (tor);
assert (tr_isTorrent (tor));
@ -3041,6 +3042,7 @@ setLocation (void * vdata)
*data->setme_state = err ? TR_LOC_ERROR : TR_LOC_DONE;
/* cleanup */
tr_torrentUnlock (tor);
tr_free (data->location);
tr_free (data);
}