Fix deletion of nonexistent share

When we try delete share that does not exist, we get following error:
UnboundLocalError: local variable 'share_ref' referenced before assignment

Change-Id: I2aca0874e76d1145825b89e34bcd9a53fe7a2b1d
Closes-Bug: #1353466