NORETURN void
Panic(const char *fmtstr, ...)
{
- va_list args;
-
char *tmp = malloc(MAXSTRING);
if (tmp != NULL) {
+ va_list args;
va_start(args, fmtstr);
Str_Vsnprintf(tmp, MAXSTRING, fmtstr, args);
va_end(args);
/*********************************************************
- * Copyright (C) 2007-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2007-2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
Process_Destroy(ProcessHandle h)
{
ProcessInternal* p;
- int i;
p = (ProcessInternal*)h;
if (p->stdoutFd >= 0) {
close(p->stdoutFd);
free(p->stdoutStr);
free(p->stderrStr);
if (p->args != NULL) {
+ int i;
for (i = 0; p->args[i] != NULL; i++) {
free(p->args[i]);
}
DeployPkgExecDeploy(ToolsAppCtx *ctx, // IN: app context
void *pkgName) // IN: pkg file name
{
- char errMsg[2048];
ToolsDeployPkgError ret;
char *pkgNameStr = (char *) pkgName;
Bool enableCust;
g_free(msg);
vm_free(result);
} else {
+ char errMsg[2048];
/* Unpack the package and run the command. */
ret = DeployPkgDeployPkgInGuest(ctx, pkgNameStr, errMsg, sizeof errMsg);
if (ret != TOOLSDEPLOYPKG_ERROR_SUCCESS) {
/*********************************************************
- * Copyright (C) 2006-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2006-2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
...) // IN
{
va_list args;
- gchar *tstamp;
- const char *logLevel;
- GLogLevelFlags glogLevel;
if (fmtstr == NULL) {
return;
va_start(args, fmtstr);
if (_file != NULL) {
+ const char *logLevel;
+ gchar *tstamp;
size_t fmtstrLen = strlen(fmtstr);
switch (level) {
case log_debug:
}
g_free(tstamp);
} else {
+ GLogLevelFlags glogLevel;
switch (level) {
case log_debug:
glogLevel = G_LOG_LEVEL_DEBUG;