Skip to content

Commit

Permalink
record: move free() to after last use of pContext
Browse files Browse the repository at this point in the history
No functional change, since free doesn't change the value of the pointer
passed to it, but it makes this code less confusing.

Reviewed-by: Jamey Sharp <[email protected]>
Signed-off-by: Matt Turner <[email protected]>
  • Loading branch information
mattst88 authored and dottedmag committed Jun 11, 2010
1 parent a54a766 commit 89bd051
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions record/record.c
Original file line number Diff line number Diff line change
Expand Up @@ -2520,8 +2520,6 @@ RecordDeleteContext(pointer value, XID id)
}
}

free(pContext);

/* remove context from AllContexts list */

if (-1 != (i = RecordFindContextOnAllContexts(pContext)))
Expand All @@ -2533,6 +2531,8 @@ RecordDeleteContext(pointer value, XID id)
ppAllContexts = NULL;
}
}
free(pContext);

return Success;
} /* RecordDeleteContext */

Expand Down

0 comments on commit 89bd051

Please sign in to comment.