Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
4674b4a7
Commit
4674b4a7
authored
8 years ago
by
Hisham
Browse files
Options
Download
Email Patches
Plain Diff
Stricter strdup.
parent
7ededce9
master
fixedgray
lua
next
perfcounters
pkgconfig-on-linux
solaris
3.0.0beta5
3.0.0beta4
3.0.0beta3
3.0.0beta2
3.0.0beta1
2.2.0
2.1.0
2.0.2
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
XAlloc.c
+4
-1
XAlloc.c
with
4 additions
and
1 deletion
+4
-1
XAlloc.c
View file @
4674b4a7
...
...
@@ -44,8 +44,11 @@ void* xRealloc(void* ptr, size_t size) {
}
char
*
xStrdup
(
const
char
*
str
)
{
if
(
!
str
)
{
fail
();
}
char
*
data
=
strdup
(
str
);
if
(
!
data
&&
str
)
{
if
(
!
data
)
{
fail
();
}
return
data
;
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help