From: John Wolfe Date: Fri, 11 Sep 2020 19:11:03 +0000 (-0700) Subject: Swap out Log+PANIC for Panic X-Git-Tag: stable-11.2.0~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42af202affbf0cc2bb533dd430933bf5ee2ce247;p=thirdparty%2Fopen-vm-tools.git Swap out Log+PANIC for Panic Just call Panic with an appropriate string instead of a Log+PANIC. --- diff --git a/open-vm-tools/lib/unicode/unicodeCommon.c b/open-vm-tools/lib/unicode/unicodeCommon.c index 10dcb73b0..0102af77a 100644 --- a/open-vm-tools/lib/unicode/unicodeCommon.c +++ b/open-vm-tools/lib/unicode/unicodeCommon.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2016 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2016,2020 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 @@ -331,16 +331,10 @@ Unicode_AllocWithLength(const void *buffer, // IN: char *escapedBuffer = Unicode_EscapeBuffer(buffer, lengthInBytes, encoding); - /* - * Log and panic on failure. - */ - - Log("%s: Couldn't convert invalid buffer [%s] from %s to Unicode.\n", - __FUNCTION__, - escapedBuffer ? escapedBuffer : "(couldn't escape bytes)", - Unicode_EncodingEnumToName(encoding)); - free(escapedBuffer); - PANIC(); + Panic("%s: Couldn't convert invalid buffer [%s] from %s to Unicode.\n", + __FUNCTION__, + escapedBuffer ? escapedBuffer : "(couldn't escape bytes)", + Unicode_EncodingEnumToName(encoding)); } return result;