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

2023.8-3 coverity scan #3265

Merged
merged 4 commits into from
Jun 27, 2024
Merged

Commits on Jun 20, 2024

  1. tree: Fix name memory leak

    Coverity points out that we have a memory leak from `g_strdup(name)`.
    `insert_child_mtree()` takes a const char * and duplicates it.
    `name` can be passed directly to `insert_child_mtree()`.
    lukewarmtemp committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    dc9eaef View commit details
    Browse the repository at this point in the history
  2. commit: Null terminate target_buf var

    Coverity points out that we are passing an unterminated string to
    sprintf(). Fix by using snprintf() which stores the content as a C
    string.
    lukewarmtemp committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    20d5bc8 View commit details
    Browse the repository at this point in the history
  3. repo: Fix dir_or_file_path memory leak

    Coverity points out that we have a memory leak from
    `g_strdup(dir_or_file_path)`. Make the duplication of the string a
    temporary variable that is freed using `g_autofree`.
    lukewarmtemp committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    d528083 View commit details
    Browse the repository at this point in the history
  4. prepare: Create global var for tmp_sysroot_etc

    Coverity points out that ""/sysroot.tmp/etc"" could be a copy-paste
    error. This is mistake from coverity, but to supress the warning,
    we create a global var, tmp_sysroot_etc, which replaces all
    instances of TMP_SYSROOT "/etc".
    lukewarmtemp committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    e99693c View commit details
    Browse the repository at this point in the history