root/lib/common/location.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. pcmk__free_location

   1 /*
   2  * Copyright 2024 the Pacemaker project contributors
   3  *
   4  * The version control history for this file may have further details.
   5  *
   6  * This source code is licensed under the GNU Lesser General Public License
   7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
   8  */
   9 
  10 #include <crm_internal.h>
  11 
  12 #include <stdlib.h>                 // free()
  13 #include <glib.h>                   // gpointer, g_list_free_full()
  14 
  15 #include <crm/common/scheduler.h>
  16 
  17 /*!
  18  * \internal
  19  * \brief Free a location constraint
  20  *
  21  * \param[in,out] user_data  Location constraint to free
  22  */
  23 void
  24 pcmk__free_location(gpointer user_data)
     /* [previous][next][first][last][top][bottom][index][help] */
  25 {
  26     pcmk__location_t *location = user_data;
  27 
  28     g_list_free_full(location->nodes, pcmk__free_node_copy);
  29     free(location->id);
  30     free(location);
  31 }

/* [previous][next][first][last][top][bottom][index][help] */