diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-03-06 03:29:15 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-04-14 18:26:00 -0400 |
commit | 8270b45bc8a45eef4a224bd256bd0997d4fd857e (patch) | |
tree | 8b7ada55f915b4c2a06a70503ba2062766c9b1a3 /drivers/xen/blkback/blkback.c | |
parent | dd3672424caa7b302433635831afbb6787476b96 (diff) |
blkback: Fix potential resource leak.
Diffstat (limited to 'drivers/xen/blkback/blkback.c')
-rw-r--r-- | drivers/xen/blkback/blkback.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/xen/blkback/blkback.c b/drivers/xen/blkback/blkback.c index 43fd07091d4d..8d988f4513aa 100644 --- a/drivers/xen/blkback/blkback.c +++ b/drivers/xen/blkback/blkback.c | |||
@@ -318,14 +318,14 @@ static int do_block_io_op(blkif_t *blkif) | |||
318 | if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc)) | 318 | if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc)) |
319 | break; | 319 | break; |
320 | 320 | ||
321 | pending_req = alloc_req(); | 321 | if (kthread_should_stop()) { |
322 | if (NULL == pending_req) { | ||
323 | blkif->st_oo_req++; | ||
324 | more_to_do = 1; | 322 | more_to_do = 1; |
325 | break; | 323 | break; |
326 | } | 324 | } |
327 | 325 | ||
328 | if (kthread_should_stop()) { | 326 | pending_req = alloc_req(); |
327 | if (NULL == pending_req) { | ||
328 | blkif->st_oo_req++; | ||
329 | more_to_do = 1; | 329 | more_to_do = 1; |
330 | break; | 330 | break; |
331 | } | 331 | } |