Skip to content
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

V0/topic/nfsboot #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

V0/topic/nfsboot #1

wants to merge 1 commit into from

Conversation

ejoerns
Copy link
Owner

@ejoerns ejoerns commented Feb 24, 2016

No description provided.

If no valid boot source was found matching any of the known slot
entries, add a pseudo slot entry for nfs to the list of slots and set it
`booted`.

Signed-off-by: Enrico Jorns <[email protected]>
@ejoerns ejoerns force-pushed the master branch 2 times, most recently from 3278046 to 78f7098 Compare September 21, 2021 06:06
ejoerns added a commit that referenced this pull request Nov 9, 2021
During manifest file parsing, we ensure that filename is set and allow
an unset filename only for an install hook.
Thus having filename unset after checking this conditition is a
programming error here. Check it with g_assert_nonnull().

Fixes coverity warning:

| CID 1465767 (#1 of 1): Dereference after null check (FORWARD_NULL)
| 20. var_deref_model: Passing null pointer mfimage->filename to g_file_test, which dereferences it.

Fixes 8a9c921 which added this check:

+               /* skip source image checks if filename is not set (install hook) */
+               if (!mfimage->filename && mfimage->hooks.install)
+                       goto skip_filename_checks;
+

that lets coverity assume we explicitly pass here in case of
mfimage->filename being null:

| 17. var_compare_op: Comparing mfimage->filename to null implies that mfimage->filename might be null.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Nov 9, 2021
During manifest file parsing, we ensure that filename is set and allow
an unset filename only for an install hook.
Thus having filename unset after checking this conditition is a
programming error here. Split the prior single condition into two and
check the unexpected case with g_assert_not_reached() to signal that reaching
this must be a programming error.

Fixes coverity warning:

| CID 1465767 (#1 of 1): Dereference after null check (FORWARD_NULL)
| 20. var_deref_model: Passing null pointer mfimage->filename to g_file_test, which dereferences it.

Fixes 8a9c921 which added this check:

+               /* skip source image checks if filename is not set (install hook) */
+               if (!mfimage->filename && mfimage->hooks.install)
+                       goto skip_filename_checks;
+

that lets coverity assume we explicitly pass here in case of
mfimage->filename being null:

| 17. var_compare_op: Comparing mfimage->filename to null implies that mfimage->filename might be null.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 1, 2022
The char pointer array 'groups' is freed manually with g_strfreev.
It is not freed in case of an error and a jump to the 'free:' label.

Fixes coverity issue:
| CID 1445510 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 17. leaked_storage: Variable groups going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 1, 2022
Fixes coverity issue:
| CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 1, 2022
The variable 'string' will not be freed on error.
Use g_autoptr to automatically free 'string' and use this to simplify
code.

Fixes coverity issue:
| CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable string going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 1, 2022
The binary data returned by r_hex_decode() is not freed. Fix it.

Fixes coverity issue:
| CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to.
ejoerns added a commit that referenced this pull request Mar 1, 2022
When jumping to free: label, g_strfreev() will not be called.
Use g_autoptr() instead.

Fixes coverity issue:
| CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 47. leaked_storage: Variable groups going out of scope leaks the storage it points to.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The char pointer array 'groups' is freed manually with g_strfreev.
It is not freed in case of an error and a jump to the 'free:' label.

Fixes coverity issue:
| CID 1445510 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 17. leaked_storage: Variable groups going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
Fixes coverity issue:
| CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The variable 'string' will not be freed on error.
Use g_autoptr to automatically free 'string' and use this to simplify
code.

Fixes coverity issue:
| CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable string going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The binary data returned by r_hex_decode() is not freed. Fix it.

Fixes coverity issue:
| CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to.
ejoerns added a commit that referenced this pull request Mar 2, 2022
When jumping to free: label, g_strfreev() will not be called.
Use g_autoptr() instead.

Fixes coverity issue:
| CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 47. leaked_storage: Variable groups going out of scope leaks the storage it points to.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The char pointer array 'groups' is freed manually with g_strfreev.
It is not freed in case of an error and a jump to the 'free:' label.

Fixes coverity issue:
| CID 1445510 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 17. leaked_storage: Variable groups going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
Fixes coverity issue:
| CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The variable 'string' will not be freed on error.
Use g_autoptr to automatically free 'string' and use this to simplify
code.

Fixes coverity issue:
| CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable string going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The binary data returned by r_hex_decode() is not freed. Fix it.

Fixes coverity issue:
| CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to.
ejoerns added a commit that referenced this pull request Mar 2, 2022
When jumping to free: label, g_strfreev() will not be called.
Use g_autoptr() instead.

Fixes coverity issue:
| CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 47. leaked_storage: Variable groups going out of scope leaks the storage it points to.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The char pointer array 'groups' is freed manually with g_strfreev.
It is not freed in case of an error and a jump to the 'free:' label.

Fixes coverity issue:
| CID 1445510 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 17. leaked_storage: Variable groups going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
Fixes coverity issue:
| CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The variable 'string' will not be freed on error.
Use g_autoptr to automatically free 'string' and use this to simplify
code.

Fixes coverity issue:
| CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable string going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The binary data returned by r_hex_decode() is not freed. Fix it.

Fixes coverity issue:
| CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
When jumping to free: label, g_strfreev() will not be called.
Use g_autoptr() instead.

Fixes coverity issue:
| CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 47. leaked_storage: Variable groups going out of scope leaks the storage it points to.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
Fixes coverity issue:
| CID 1445506 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable raucm going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The variable 'string' will not be freed on error.
Use g_autoptr to automatically free 'string' and use this to simplify
code.

Fixes coverity issue:
| CID 1445505 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 7. leaked_storage: Variable string going out of scope leaks the storage it points to

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
The binary data returned by r_hex_decode() is not freed. Fix it.

Fixes coverity issue:
| CID 1445503 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 23. leaked_storage: Variable root_digest going out of scope leaks the storage it points to.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 2, 2022
When jumping to free: label, g_strfreev() will not be called.
Use g_autoptr() instead.

Fixes coverity issue:
| CID 1445489 (#1 of 1): Resource leak (RESOURCE_LEAK)
| 47. leaked_storage: Variable groups going out of scope leaks the storage it points to.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 3, 2022
Fixes defect reported by coverity:
| CID 1475713 (#1 of 1): Unused value (UNUSED_VALUE)
| assigned_value: Assigning value 1.79769e+308 to stats->min here, but that stored value is overwritten before it can be used.

Signed-off-by: Enrico Joerns <[email protected]>
ejoerns added a commit that referenced this pull request Mar 17, 2022
Fixes defect reported by coverity:
| CID 1475713 (#1 of 1): Unused value (UNUSED_VALUE)
| assigned_value: Assigning value 1.79769e+308 to stats->min here, but that stored value is overwritten before it can be used.

This also fixes 'min' calculation as 'min' was already set to the
smalles possible value and thus could not be decreased.

Signed-off-by: Enrico Joerns <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant