-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix the pointer initialization #2446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the pointer initialization #2446
Conversation
If the overwriteStruct() finds an uninitialized pointer, it tries to initialize it, but does it incorrectly. It tries to assign a pointer to pointer, instead of pointer. Signed-off-by: Gladkov Alexey <agladkov@redhat.com>
Codecov Report
@@ Coverage Diff @@
## master #2446 +/- ##
==========================================
- Coverage 60.32% 50.76% -9.56%
==========================================
Files 126 126
Lines 14436 14436
==========================================
- Hits 8708 7329 -1379
- Misses 4844 6363 +1519
+ Partials 884 744 -140
Continue to review full report at Codecov.
|
|
Can you add a unit test for this? |
|
@zhouhaibing089 Sure. Done. |
Signed-off-by: Gladkov Alexey <agladkov@redhat.com>
888b248 to
e698374
Compare
|
@RichardScothern please review |
dmcgowan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If the
overwriteStruct()finds an uninitialized pointer, it tries to initialize it, but does it incorrectly. It tries to assign a pointer to pointer, instead of pointer.