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

CodeAi fixes: 1 Null Deref, and 4 Dead Code #247

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion open-vm-tools/lib/misc/posixPosix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2111,7 +2111,6 @@ Posix_Getmntent_r(FILE *fp, // IN:
goto exit;
}
m->mnt_opts = memcpy(buf + n, opts, len);
n += len;
}
ret = 0;

Expand Down
1 change: 0 additions & 1 deletion open-vm-tools/lib/procMgr/procMgrPosix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,6 @@ ProcMgr_ImpersonateUserStart(const char *user, // IN: UTF-8 encoded user name
* according to POSIX 1003.1-2003, so patch up the errno.
*/
if (error == 0) {
error = ENOENT;
}
return FALSE;
}
Expand Down
1 change: 0 additions & 1 deletion open-vm-tools/services/plugins/guestInfo/perfMonLinux.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,6 @@ GuestInfoAppendMemNeeded(GuestInfoCollector *current, // IN: current collection
memNeeded = memPhysUsable->value - memAvailable;
} else {
memNeeded = 0;
memNeededReservation = 0;
}

GuestInfoAppendStat(0,
Expand Down
4 changes: 3 additions & 1 deletion open-vm-tools/services/vmtoolsd/pluginMgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,9 @@ ToolsCore_UnloadPlugins(ToolsServiceState *state)
ToolsPlugin *plugin = g_ptr_array_index(state->plugins, state->plugins->len - 1);
GArray *regs = (plugin->data != NULL) ? plugin->data->regs : NULL;

g_message("Unloading plugin '%s'.\n", plugin->data->name);
if(plugin->data != NULL) {
g_message("Unloading plugin '%s'.\n", plugin->data->name);
}

if (regs != NULL) {
guint i;
Expand Down
1 change: 0 additions & 1 deletion open-vm-tools/toolbox/toolboxcmd-shrink.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ ShrinkDoWipeAndShrink(char *mountPoint, // IN: mount point
ToolsCmd_PrintErr(SU_(error.message, "Error: %s\n"), err);
}

rc = EX_TEMPFAIL;
break;
}

Expand Down