|
@@ -190,14 +190,18 @@ static int downloader_vredirect ( struct downloader *downloader, int type,
|
190
|
190
|
|
191
|
191
|
/* Set image URI */
|
192
|
192
|
if ( ( rc = image_set_uri ( downloader->image, uri ) ) != 0 )
|
193
|
|
- return rc;
|
|
193
|
+ goto err;
|
194
|
194
|
}
|
195
|
195
|
|
196
|
196
|
/* Redirect to new location */
|
197
|
197
|
if ( ( rc = xfer_vreopen ( &downloader->xfer, type, args ) ) != 0 )
|
198
|
|
- return rc;
|
|
198
|
+ goto err;
|
199
|
199
|
|
200
|
200
|
return 0;
|
|
201
|
+
|
|
202
|
+ err:
|
|
203
|
+ downloader_finished ( downloader, rc );
|
|
204
|
+ return rc;
|
201
|
205
|
}
|
202
|
206
|
|
203
|
207
|
/** Downloader data transfer interface operations */
|