Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
cceab15b
Commit
cceab15b
authored
Aug 24, 2016
by
Hisham
Browse files
free(NULL) is a valid no-op, so let's make String_freeArray(NULL) valid too.
parent
bd5d37f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
StringUtils.c
View file @
cceab15b
...
...
@@ -93,6 +93,9 @@ char** String_split(const char* s, char sep, int* n) {
}
void
String_freeArray
(
char
**
s
)
{
if
(
!
s
)
{
return
;
}
for
(
int
i
=
0
;
s
[
i
]
!=
NULL
;
i
++
)
{
free
(
s
[
i
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment