Skip to content

Commit

Permalink
Fix uninitialize variable access
Browse files Browse the repository at this point in the history
The patch 4d81260 has a trivial bug
that is uninitialized variable access just before set up the variable.
  • Loading branch information
Katsuya Matsubara authored and kfish committed Mar 19, 2010
1 parent 87fdc85 commit d9ef65a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libuiomux/uiomux.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,12 +569,12 @@ uiomux_get_mem(struct uiomux *uiomux, uiomux_resource_t blockmask,
if ((i = uiomux_get_block_index(uiomux, blockmask)) == -1)
return 0;

block = &uiomux->blocks[i];

/* Invalid if no uio associated with it */
if (block->uio == NULL)
return 0;

block = &uiomux->blocks[i];

if (address)
*address = block->uio->mem.address;
if (size)
Expand Down

0 comments on commit d9ef65a

Please sign in to comment.