Allow to pass NULL pointers to FreeStrBuf.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5597 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -6,10 +6,10 @@
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* (C) 2001-2008 Ullrich von Bassewitz */
|
/* (C) 2001-2012, Ullrich von Bassewitz */
|
||||||
/* Roemerstrasse 52 */
|
/* Roemerstrasse 52 */
|
||||||
/* D-70794 Filderstadt */
|
/* D-70794 Filderstadt */
|
||||||
/* EMail: uz@cc65.org */
|
/* EMail: uz@cc65.org */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* This software is provided 'as-is', without any expressed or implied */
|
/* This software is provided 'as-is', without any expressed or implied */
|
||||||
@@ -115,8 +115,11 @@ StrBuf* NewStrBuf (void)
|
|||||||
void FreeStrBuf (StrBuf* B)
|
void FreeStrBuf (StrBuf* B)
|
||||||
/* Free a string buffer */
|
/* Free a string buffer */
|
||||||
{
|
{
|
||||||
SB_Done (B);
|
/* Allow NULL pointers */
|
||||||
xfree (B);
|
if (B) {
|
||||||
|
SB_Done (B);
|
||||||
|
xfree (B);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user