From: John Wolfe Date: Mon, 7 Jun 2021 15:25:09 +0000 (-0700) Subject: Change to a common source file not directly applicable to open-vm-tools. X-Git-Tag: stable-12.0.0~183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd151c59769f9bac14fc2df0d1076faa902734bf;p=thirdparty%2Fopen-vm-tools.git Change to a common source file not directly applicable to open-vm-tools. Adding a NULL pointer check. --- diff --git a/open-vm-tools/lib/poll/poll.c b/open-vm-tools/lib/poll/poll.c index da2db361d..580b5c96f 100644 --- a/open-vm-tools/lib/poll/poll.c +++ b/open-vm-tools/lib/poll/poll.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2020 VMware, Inc. All rights reserved. + * Copyright (C) 1998-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 @@ -132,9 +132,10 @@ Poll_InitWithImpl(const PollImpl *impl) void Poll_Exit(void) { - pollImpl->Exit(); - - pollImpl = NULL; + if (pollImpl) { + pollImpl->Exit(); + pollImpl = NULL; + } }