Coverage Report

Created: 2026-10-28 07:47

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/include/glib-2.0/glib/gmem.h
Line
Count
Source
1
/* GLIB - Library of useful routines for C programming
2
 * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
3
 *
4
 * SPDX-License-Identifier: LGPL-2.1-or-later
5
 *
6
 * This library is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU Lesser General Public
8
 * License as published by the Free Software Foundation; either
9
 * version 2.1 of the License, or (at your option) any later version.
10
 *
11
 * This library is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public
17
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18
 */
19
20
/*
21
 * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
22
 * file for a list of people on the GLib Team.  See the ChangeLog
23
 * files for a list of changes.  These files are distributed with
24
 * GLib at ftp://ftp.gtk.org/pub/gtk/.
25
 */
26
27
#ifndef __G_MEM_H__
28
#define __G_MEM_H__
29
30
#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
31
#error "Only <glib.h> can be included directly."
32
#endif
33
34
#include <glib/gutils.h>
35
#include <glib/glib-typeof.h>
36
37
G_BEGIN_DECLS
38
39
/**
40
 * GMemVTable:
41
 * @malloc: function to use for allocating memory.
42
 * @realloc: function to use for reallocating memory.
43
 * @free: function to use to free memory.
44
 * @calloc: function to use for allocating zero-filled memory.
45
 * @try_malloc: function to use for allocating memory without a default error handler.
46
 * @try_realloc: function to use for reallocating memory without a default error handler.
47
 * 
48
 * A set of functions used to perform memory allocation. The same #GMemVTable must
49
 * be used for all allocations in the same program; a call to g_mem_set_vtable(),
50
 * if it exists, should be prior to any use of GLib.
51
 *
52
 * This functions related to this has been deprecated in 2.46, and no longer work.
53
 */
54
typedef struct _GMemVTable GMemVTable;
55
56
57
#if GLIB_SIZEOF_VOID_P > GLIB_SIZEOF_LONG
58
/**
59
 * G_MEM_ALIGN:
60
 *
61
 * Indicates the number of bytes to which memory will be aligned on the
62
 * current platform.
63
 */
64
#  define G_MEM_ALIGN GLIB_SIZEOF_VOID_P
65
#else /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */
66
#  define G_MEM_ALIGN GLIB_SIZEOF_LONG
67
#endif  /* GLIB_SIZEOF_VOID_P <= GLIB_SIZEOF_LONG */
68
69
70
/* Memory allocation functions
71
 */
72
73
GLIB_AVAILABLE_IN_ALL
74
void     (g_free)         (gpointer      mem);
75
GLIB_AVAILABLE_IN_2_76
76
void     g_free_sized     (gpointer      mem,
77
                           size_t        size);
78
79
GLIB_AVAILABLE_IN_2_34
80
void     g_clear_pointer  (gpointer      *pp,
81
                           GDestroyNotify destroy);
82
83
GLIB_AVAILABLE_IN_ALL
84
gpointer g_malloc         (gsize   n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
85
GLIB_AVAILABLE_IN_ALL
86
gpointer g_malloc0        (gsize   n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
87
GLIB_AVAILABLE_IN_ALL
88
gpointer g_realloc        (gpointer  mem,
89
         gsize   n_bytes) G_GNUC_WARN_UNUSED_RESULT;
90
GLIB_AVAILABLE_IN_ALL
91
gpointer g_try_malloc     (gsize   n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
92
GLIB_AVAILABLE_IN_ALL
93
gpointer g_try_malloc0    (gsize   n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
94
GLIB_AVAILABLE_IN_ALL
95
gpointer g_try_realloc    (gpointer  mem,
96
         gsize   n_bytes) G_GNUC_WARN_UNUSED_RESULT;
97
98
GLIB_AVAILABLE_IN_ALL
99
gpointer g_malloc_n       (gsize   n_blocks,
100
         gsize   n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2);
101
GLIB_AVAILABLE_IN_ALL
102
gpointer g_malloc0_n      (gsize   n_blocks,
103
         gsize   n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2);
104
GLIB_AVAILABLE_IN_ALL
105
gpointer g_realloc_n      (gpointer  mem,
106
         gsize   n_blocks,
107
         gsize   n_block_bytes) G_GNUC_WARN_UNUSED_RESULT;
108
GLIB_AVAILABLE_IN_ALL
109
gpointer g_try_malloc_n   (gsize   n_blocks,
110
         gsize   n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2);
111
GLIB_AVAILABLE_IN_ALL
112
gpointer g_try_malloc0_n  (gsize   n_blocks,
113
         gsize   n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1,2);
114
GLIB_AVAILABLE_IN_ALL
115
gpointer g_try_realloc_n  (gpointer  mem,
116
         gsize   n_blocks,
117
         gsize   n_block_bytes) G_GNUC_WARN_UNUSED_RESULT;
118
119
GLIB_AVAILABLE_IN_2_72
120
gpointer g_aligned_alloc  (gsize         n_blocks,
121
                           gsize         n_block_bytes,
122
                           gsize         alignment) G_GNUC_WARN_UNUSED_RESULT G_GNUC_ALLOC_SIZE2(1,2);
123
GLIB_AVAILABLE_IN_2_72
124
gpointer g_aligned_alloc0 (gsize         n_blocks,
125
                           gsize         n_block_bytes,
126
                           gsize         alignment) G_GNUC_WARN_UNUSED_RESULT G_GNUC_ALLOC_SIZE2(1,2);
127
GLIB_AVAILABLE_IN_2_72
128
void     g_aligned_free   (gpointer      mem);
129
GLIB_AVAILABLE_IN_2_76
130
void     g_aligned_free_sized (gpointer  mem,
131
                               size_t    alignment,
132
                               size_t    size);
133
134
#if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58
135
#define g_clear_pointer(pp, destroy)                     \
136
8.62M
  G_STMT_START                                           \
137
8.62M
  {                                                      \
138
8.62M
    G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \
139
8.62M
    glib_typeof ((pp)) _pp = (pp);                       \
140
8.62M
    glib_typeof (*(pp)) _ptr = *_pp;                     \
141
8.62M
    *_pp = NULL;                                         \
142
8.62M
    if (_ptr)                                            \
143
8.62M
      (destroy) (_ptr);                                  \
144
8.62M
  }                                                      \
145
8.62M
  G_STMT_END                                             \
146
1.65M
  GLIB_AVAILABLE_MACRO_IN_2_34
147
#else /* __GNUC__ */
148
#define g_clear_pointer(pp, destroy) \
149
  G_STMT_START {                                                               \
150
    G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer));                       \
151
    /* Only one access, please; work around type aliasing */                   \
152
    union { char *in; gpointer *out; } _pp;                                    \
153
    gpointer _p;                                                               \
154
    /* This assignment is needed to avoid a gcc warning */                     \
155
    GDestroyNotify _destroy = (GDestroyNotify) (destroy);                      \
156
                                                                               \
157
    _pp.in = (char *) (pp);                                                    \
158
    _p = *_pp.out;                                                             \
159
    if (_p)                        \
160
      {                        \
161
        *_pp.out = NULL;                                                       \
162
        _destroy (_p);                                                         \
163
      }                                                                        \
164
  } G_STMT_END                                                                 \
165
  GLIB_AVAILABLE_MACRO_IN_2_34
166
#endif /* __GNUC__ */
167
168
169
#if G_GNUC_CHECK_VERSION (4, 1) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_78 && defined(G_HAVE_FREE_SIZED)
170
171
#define g_free(mem)                                                            \
172
  (__builtin_object_size ((mem), 0) != ((size_t) - 1)) ?                       \
173
    g_free_sized (mem, __builtin_object_size ((mem), 0)) : (g_free) (mem)
174
175
#endif /* G_GNUC_CHECK_VERSION (4, 1) && && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_78 && defined(G_HAVE_FREE_SIZED) */
176
177
/**
178
 * g_steal_pointer:
179
 * @pp: (not nullable): a pointer to a pointer
180
 *
181
 * Sets @pp to %NULL, returning the value that was there before.
182
 *
183
 * Conceptually, this transfers the ownership of the pointer from the
184
 * referenced variable to the "caller" of the macro (ie: "steals" the
185
 * reference).
186
 *
187
 * The return value will be properly typed, according to the type of
188
 * @pp.
189
 *
190
 * This can be very useful when combined with g_autoptr() to prevent the
191
 * return value of a function from being automatically freed.  Consider
192
 * the following example (which only works on GCC and clang):
193
 *
194
 * |[
195
 * GObject *
196
 * create_object (void)
197
 * {
198
 *   g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
199
 *
200
 *   if (early_error_case)
201
 *     return NULL;
202
 *
203
 *   return g_steal_pointer (&obj);
204
 * }
205
 * ]|
206
 *
207
 * It can also be used in similar ways for 'out' parameters and is
208
 * particularly useful for dealing with optional out parameters:
209
 *
210
 * |[
211
 * gboolean
212
 * get_object (GObject **obj_out)
213
 * {
214
 *   g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
215
 *
216
 *   if (early_error_case)
217
 *     return FALSE;
218
 *
219
 *   if (obj_out)
220
 *     *obj_out = g_steal_pointer (&obj);
221
 *
222
 *   return TRUE;
223
 * }
224
 * ]|
225
 *
226
 * In the above example, the object will be automatically freed in the
227
 * early error case and also in the case that %NULL was given for
228
 * @obj_out.
229
 *
230
 * Since: 2.44
231
 */
232
GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
233
static inline gpointer
234
g_steal_pointer (gpointer pp)
235
32.6M
{
236
32.6M
  gpointer *ptr = (gpointer *) pp;
237
32.6M
  gpointer ref;
238
239
32.6M
  ref = *ptr;
240
32.6M
  *ptr = NULL;
241
242
32.6M
  return ref;
243
32.6M
}
fu-synaptics-cape-struct.c:g_steal_pointer
Line
Count
Source
235
100
{
236
100
  gpointer *ptr = (gpointer *) pp;
237
100
  gpointer ref;
238
239
100
  ref = *ptr;
240
100
  *ptr = NULL;
241
242
100
  return ref;
243
100
}
Unexecuted instantiation: fu-synaptics-cape-firmware.c:g_steal_pointer
fu-synaptics-cape-hid-firmware.c:g_steal_pointer
Line
Count
Source
235
100
{
236
100
  gpointer *ptr = (gpointer *) pp;
237
100
  gpointer ref;
238
239
100
  ref = *ptr;
240
100
  *ptr = NULL;
241
242
100
  return ref;
243
100
}
Unexecuted instantiation: fu-synaptics-cape-sngl-firmware.c:g_steal_pointer
Unexecuted instantiation: fwupd-bios-setting-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-client-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-codec-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-device-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-enums-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-error-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-jcat-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-plugin-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-release-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-remote-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-report-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-request-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-security-attr-struct.c:g_steal_pointer
Unexecuted instantiation: fwupd-common.c:g_steal_pointer
Unexecuted instantiation: fwupd-codec.c:g_steal_pointer
Unexecuted instantiation: fwupd-device.c:g_steal_pointer
Unexecuted instantiation: fwupd-error.c:g_steal_pointer
Unexecuted instantiation: fwupd-file-input-stream.c:g_steal_pointer
Unexecuted instantiation: fwupd-input-stream.c:g_steal_pointer
fwupd-memory-input-stream.c:g_steal_pointer
Line
Count
Source
235
820k
{
236
820k
  gpointer *ptr = (gpointer *) pp;
237
820k
  gpointer ref;
238
239
820k
  ref = *ptr;
240
820k
  *ptr = NULL;
241
242
820k
  return ref;
243
820k
}
Unexecuted instantiation: fwupd-stream-input-stream.c:g_steal_pointer
Unexecuted instantiation: fwupd-bios-setting.c:g_steal_pointer
Unexecuted instantiation: fwupd-jcat-blob.c:g_steal_pointer
Unexecuted instantiation: fwupd-jcat-file.c:g_steal_pointer
Unexecuted instantiation: fwupd-jcat-item.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-array.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-common.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-node.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-object.c:g_steal_pointer
Unexecuted instantiation: fwupd-json-parser.c:g_steal_pointer
Unexecuted instantiation: fwupd-security-attr.c:g_steal_pointer
Unexecuted instantiation: fwupd-release.c:g_steal_pointer
Unexecuted instantiation: fwupd-report.c:g_steal_pointer
Unexecuted instantiation: fwupd-request.c:g_steal_pointer
Unexecuted instantiation: fwupd-variant.c:g_steal_pointer
Unexecuted instantiation: fu-cbor-struct.c:g_steal_pointer
Unexecuted instantiation: fu-crc-struct.c:g_steal_pointer
Unexecuted instantiation: fu-progress-struct.c:g_steal_pointer
Unexecuted instantiation: fu-common-struct.c:g_steal_pointer
fu-acpi-table-struct.c:g_steal_pointer
Line
Count
Source
235
2.12k
{
236
2.12k
  gpointer *ptr = (gpointer *) pp;
237
2.12k
  gpointer ref;
238
239
2.12k
  ref = *ptr;
240
2.12k
  *ptr = NULL;
241
242
2.12k
  return ref;
243
2.12k
}
fu-cab-struct.c:g_steal_pointer
Line
Count
Source
235
255k
{
236
255k
  gpointer *ptr = (gpointer *) pp;
237
255k
  gpointer ref;
238
239
255k
  ref = *ptr;
240
255k
  *ptr = NULL;
241
242
255k
  return ref;
243
255k
}
Unexecuted instantiation: fu-cfi-struct.c:g_steal_pointer
Unexecuted instantiation: fu-cfu-struct.c:g_steal_pointer
fu-cfu-firmware-struct.c:g_steal_pointer
Line
Count
Source
235
511k
{
236
511k
  gpointer *ptr = (gpointer *) pp;
237
511k
  gpointer ref;
238
239
511k
  ref = *ptr;
240
511k
  *ptr = NULL;
241
242
511k
  return ref;
243
511k
}
Unexecuted instantiation: fu-config-struct.c:g_steal_pointer
Unexecuted instantiation: fu-coswid-struct.c:g_steal_pointer
Unexecuted instantiation: fu-context-struct.c:g_steal_pointer
Unexecuted instantiation: fu-device-struct.c:g_steal_pointer
fu-dfu-firmware-struct.c:g_steal_pointer
Line
Count
Source
235
2.22k
{
236
2.22k
  gpointer *ptr = (gpointer *) pp;
237
2.22k
  gpointer ref;
238
239
2.22k
  ref = *ptr;
240
2.22k
  *ptr = NULL;
241
242
2.22k
  return ref;
243
2.22k
}
Unexecuted instantiation: fu-dpaux-struct.c:g_steal_pointer
Unexecuted instantiation: fu-dump-struct.c:g_steal_pointer
fu-edid-struct.c:g_steal_pointer
Line
Count
Source
235
945
{
236
945
  gpointer *ptr = (gpointer *) pp;
237
945
  gpointer ref;
238
239
945
  ref = *ptr;
240
945
  *ptr = NULL;
241
242
945
  return ref;
243
945
}
fu-efi-struct.c:g_steal_pointer
Line
Count
Source
235
1.13M
{
236
1.13M
  gpointer *ptr = (gpointer *) pp;
237
1.13M
  gpointer ref;
238
239
1.13M
  ref = *ptr;
240
1.13M
  *ptr = NULL;
241
242
1.13M
  return ref;
243
1.13M
}
fu-elf-struct.c:g_steal_pointer
Line
Count
Source
235
4.90M
{
236
4.90M
  gpointer *ptr = (gpointer *) pp;
237
4.90M
  gpointer ref;
238
239
4.90M
  ref = *ptr;
240
4.90M
  *ptr = NULL;
241
242
4.90M
  return ref;
243
4.90M
}
fu-fdt-struct.c:g_steal_pointer
Line
Count
Source
235
75.8k
{
236
75.8k
  gpointer *ptr = (gpointer *) pp;
237
75.8k
  gpointer ref;
238
239
75.8k
  ref = *ptr;
240
75.8k
  *ptr = NULL;
241
242
75.8k
  return ref;
243
75.8k
}
Unexecuted instantiation: fu-firmware-struct.c:g_steal_pointer
fu-fmap-struct.c:g_steal_pointer
Line
Count
Source
235
145k
{
236
145k
  gpointer *ptr = (gpointer *) pp;
237
145k
  gpointer ref;
238
239
145k
  ref = *ptr;
240
145k
  *ptr = NULL;
241
242
145k
  return ref;
243
145k
}
Unexecuted instantiation: fu-hid-struct.c:g_steal_pointer
fu-ifd-struct.c:g_steal_pointer
Line
Count
Source
235
3.79k
{
236
3.79k
  gpointer *ptr = (gpointer *) pp;
237
3.79k
  gpointer ref;
238
239
3.79k
  ref = *ptr;
240
3.79k
  *ptr = NULL;
241
242
3.79k
  return ref;
243
3.79k
}
fu-ifwi-struct.c:g_steal_pointer
Line
Count
Source
235
49.1k
{
236
49.1k
  gpointer *ptr = (gpointer *) pp;
237
49.1k
  gpointer ref;
238
239
49.1k
  ref = *ptr;
240
49.1k
  *ptr = NULL;
241
242
49.1k
  return ref;
243
49.1k
}
Unexecuted instantiation: fu-ihex-struct.c:g_steal_pointer
Unexecuted instantiation: fu-intel-me-struct.c:g_steal_pointer
Unexecuted instantiation: fu-intel-thunderbolt-struct.c:g_steal_pointer
Unexecuted instantiation: fu-io-channel-struct.c:g_steal_pointer
Unexecuted instantiation: fu-ioctl-struct.c:g_steal_pointer
Unexecuted instantiation: fu-heci-struct.c:g_steal_pointer
Unexecuted instantiation: fu-msgpack-struct.c:g_steal_pointer
fu-oprom-struct.c:g_steal_pointer
Line
Count
Source
235
1.59k
{
236
1.59k
  gpointer *ptr = (gpointer *) pp;
237
1.59k
  gpointer ref;
238
239
1.59k
  ref = *ptr;
240
1.59k
  *ptr = NULL;
241
242
1.59k
  return ref;
243
1.59k
}
Unexecuted instantiation: fu-path-struct.c:g_steal_pointer
fu-pefile-struct.c:g_steal_pointer
Line
Count
Source
235
16.4k
{
236
16.4k
  gpointer *ptr = (gpointer *) pp;
237
16.4k
  gpointer ref;
238
239
16.4k
  ref = *ptr;
240
16.4k
  *ptr = NULL;
241
242
16.4k
  return ref;
243
16.4k
}
Unexecuted instantiation: fu-pci-struct.c:g_steal_pointer
Unexecuted instantiation: fu-processor-struct.c:g_steal_pointer
Unexecuted instantiation: fu-protobuf-struct.c:g_steal_pointer
fu-sbatlevel-section-struct.c:g_steal_pointer
Line
Count
Source
235
98
{
236
98
  gpointer *ptr = (gpointer *) pp;
237
98
  gpointer ref;
238
239
98
  ref = *ptr;
240
98
  *ptr = NULL;
241
242
98
  return ref;
243
98
}
Unexecuted instantiation: fu-security-attrs-struct.c:g_steal_pointer
Unexecuted instantiation: fu-smbios-struct.c:g_steal_pointer
Unexecuted instantiation: fu-srec-struct.c:g_steal_pointer
fu-tpm-struct.c:g_steal_pointer
Line
Count
Source
235
727k
{
236
727k
  gpointer *ptr = (gpointer *) pp;
237
727k
  gpointer ref;
238
239
727k
  ref = *ptr;
240
727k
  *ptr = NULL;
241
242
727k
  return ref;
243
727k
}
Unexecuted instantiation: fu-usb-device-ds20-struct.c:g_steal_pointer
fu-usb-struct.c:g_steal_pointer
Line
Count
Source
235
1.00M
{
236
1.00M
  gpointer *ptr = (gpointer *) pp;
237
1.00M
  gpointer ref;
238
239
1.00M
  ref = *ptr;
240
1.00M
  *ptr = NULL;
241
242
1.00M
  return ref;
243
1.00M
}
fu-uswid-struct.c:g_steal_pointer
Line
Count
Source
235
67.1k
{
236
67.1k
  gpointer *ptr = (gpointer *) pp;
237
67.1k
  gpointer ref;
238
239
67.1k
  ref = *ptr;
240
67.1k
  *ptr = NULL;
241
242
67.1k
  return ref;
243
67.1k
}
Unexecuted instantiation: fu-v4l-struct.c:g_steal_pointer
fu-zip-struct.c:g_steal_pointer
Line
Count
Source
235
57.9k
{
236
57.9k
  gpointer *ptr = (gpointer *) pp;
237
57.9k
  gpointer ref;
238
239
57.9k
  ref = *ptr;
240
57.9k
  *ptr = NULL;
241
242
57.9k
  return ref;
243
57.9k
}
fu-acpi-table.c:g_steal_pointer
Line
Count
Source
235
130
{
236
130
  gpointer *ptr = (gpointer *) pp;
237
130
  gpointer ref;
238
239
130
  ref = *ptr;
240
130
  *ptr = NULL;
241
242
130
  return ref;
243
130
}
Unexecuted instantiation: fu-backend.c:g_steal_pointer
Unexecuted instantiation: fu-bios-setting.c:g_steal_pointer
Unexecuted instantiation: fu-byte-array.c:g_steal_pointer
Unexecuted instantiation: fu-bytes.c:g_steal_pointer
fu-cab-firmware.c:g_steal_pointer
Line
Count
Source
235
6.12k
{
236
6.12k
  gpointer *ptr = (gpointer *) pp;
237
6.12k
  gpointer ref;
238
239
6.12k
  ref = *ptr;
240
6.12k
  *ptr = NULL;
241
242
6.12k
  return ref;
243
6.12k
}
Unexecuted instantiation: fu-cab-image.c:g_steal_pointer
fu-cbor-item.c:g_steal_pointer
Line
Count
Source
235
366k
{
236
366k
  gpointer *ptr = (gpointer *) pp;
237
366k
  gpointer ref;
238
239
366k
  ref = *ptr;
240
366k
  *ptr = NULL;
241
242
366k
  return ref;
243
366k
}
fu-cbor-common.c:g_steal_pointer
Line
Count
Source
235
205k
{
236
205k
  gpointer *ptr = (gpointer *) pp;
237
205k
  gpointer ref;
238
239
205k
  ref = *ptr;
240
205k
  *ptr = NULL;
241
242
205k
  return ref;
243
205k
}
fu-cfu-offer.c:g_steal_pointer
Line
Count
Source
235
50
{
236
50
  gpointer *ptr = (gpointer *) pp;
237
50
  gpointer ref;
238
239
50
  ref = *ptr;
240
50
  *ptr = NULL;
241
242
50
  return ref;
243
50
}
fu-cfu-payload.c:g_steal_pointer
Line
Count
Source
235
346
{
236
346
  gpointer *ptr = (gpointer *) pp;
237
346
  gpointer ref;
238
239
346
  ref = *ptr;
240
346
  *ptr = NULL;
241
242
346
  return ref;
243
346
}
Unexecuted instantiation: fu-chunk.c:g_steal_pointer
fu-chunk-array.c:g_steal_pointer
Line
Count
Source
235
1.34M
{
236
1.34M
  gpointer *ptr = (gpointer *) pp;
237
1.34M
  gpointer ref;
238
239
1.34M
  ref = *ptr;
240
1.34M
  *ptr = NULL;
241
242
1.34M
  return ref;
243
1.34M
}
Unexecuted instantiation: fu-common.c:g_steal_pointer
Unexecuted instantiation: fu-composite-input-stream.c:g_steal_pointer
fu-compressor-stream.c:g_steal_pointer
Line
Count
Source
235
8.42k
{
236
8.42k
  gpointer *ptr = (gpointer *) pp;
237
8.42k
  gpointer ref;
238
239
8.42k
  ref = *ptr;
240
8.42k
  *ptr = NULL;
241
242
8.42k
  return ref;
243
8.42k
}
Unexecuted instantiation: fu-config.c:g_steal_pointer
Unexecuted instantiation: fu-context.c:g_steal_pointer
Unexecuted instantiation: fu-coswid-common.c:g_steal_pointer
fu-coswid-firmware.c:g_steal_pointer
Line
Count
Source
235
15.2k
{
236
15.2k
  gpointer *ptr = (gpointer *) pp;
237
15.2k
  gpointer ref;
238
239
15.2k
  ref = *ptr;
240
15.2k
  *ptr = NULL;
241
242
15.2k
  return ref;
243
15.2k
}
Unexecuted instantiation: fu-crc.c:g_steal_pointer
fu-csv-entry.c:g_steal_pointer
Line
Count
Source
235
154k
{
236
154k
  gpointer *ptr = (gpointer *) pp;
237
154k
  gpointer ref;
238
239
154k
  ref = *ptr;
240
154k
  *ptr = NULL;
241
242
154k
  return ref;
243
154k
}
fu-csv-firmware.c:g_steal_pointer
Line
Count
Source
235
2.90k
{
236
2.90k
  gpointer *ptr = (gpointer *) pp;
237
2.90k
  gpointer ref;
238
239
2.90k
  ref = *ptr;
240
2.90k
  *ptr = NULL;
241
242
2.90k
  return ref;
243
2.90k
}
Unexecuted instantiation: fu-device.c:g_steal_pointer
Unexecuted instantiation: fu-device-event.c:g_steal_pointer
Unexecuted instantiation: fu-device-locker.c:g_steal_pointer
fu-dfu-firmware.c:g_steal_pointer
Line
Count
Source
235
127
{
236
127
  gpointer *ptr = (gpointer *) pp;
237
127
  gpointer ref;
238
239
127
  ref = *ptr;
240
127
  *ptr = NULL;
241
242
127
  return ref;
243
127
}
fu-dfuse-firmware.c:g_steal_pointer
Line
Count
Source
235
1.31k
{
236
1.31k
  gpointer *ptr = (gpointer *) pp;
237
1.31k
  gpointer ref;
238
239
1.31k
  ref = *ptr;
240
1.31k
  *ptr = NULL;
241
242
1.31k
  return ref;
243
1.31k
}
Unexecuted instantiation: fu-dummy-efivars.c:g_steal_pointer
Unexecuted instantiation: fu-dump.c:g_steal_pointer
fu-edid.c:g_steal_pointer
Line
Count
Source
235
374
{
236
374
  gpointer *ptr = (gpointer *) pp;
237
374
  gpointer ref;
238
239
374
  ref = *ptr;
240
374
  *ptr = NULL;
241
242
374
  return ref;
243
374
}
Unexecuted instantiation: fu-efi-common.c:g_steal_pointer
fu-efi-device-path.c:g_steal_pointer
Line
Count
Source
235
33.9k
{
236
33.9k
  gpointer *ptr = (gpointer *) pp;
237
33.9k
  gpointer ref;
238
239
33.9k
  ref = *ptr;
240
33.9k
  *ptr = NULL;
241
242
33.9k
  return ref;
243
33.9k
}
fu-efi-device-path-list.c:g_steal_pointer
Line
Count
Source
235
957
{
236
957
  gpointer *ptr = (gpointer *) pp;
237
957
  gpointer ref;
238
239
957
  ref = *ptr;
240
957
  *ptr = NULL;
241
242
957
  return ref;
243
957
}
Unexecuted instantiation: fu-efi-file-path-device-path.c:g_steal_pointer
fu-efi-file.c:g_steal_pointer
Line
Count
Source
235
7.66k
{
236
7.66k
  gpointer *ptr = (gpointer *) pp;
237
7.66k
  gpointer ref;
238
239
7.66k
  ref = *ptr;
240
7.66k
  *ptr = NULL;
241
242
7.66k
  return ref;
243
7.66k
}
fu-efi-filesystem.c:g_steal_pointer
Line
Count
Source
235
1.01k
{
236
1.01k
  gpointer *ptr = (gpointer *) pp;
237
1.01k
  gpointer ref;
238
239
1.01k
  ref = *ptr;
240
1.01k
  *ptr = NULL;
241
242
1.01k
  return ref;
243
1.01k
}
fu-efi-section.c:g_steal_pointer
Line
Count
Source
235
11.1k
{
236
11.1k
  gpointer *ptr = (gpointer *) pp;
237
11.1k
  gpointer ref;
238
239
11.1k
  ref = *ptr;
240
11.1k
  *ptr = NULL;
241
242
11.1k
  return ref;
243
11.1k
}
fu-efi-volume.c:g_steal_pointer
Line
Count
Source
235
4.44k
{
236
4.44k
  gpointer *ptr = (gpointer *) pp;
237
4.44k
  gpointer ref;
238
239
4.44k
  ref = *ptr;
240
4.44k
  *ptr = NULL;
241
242
4.44k
  return ref;
243
4.44k
}
fu-efi-lz77-decompressor.c:g_steal_pointer
Line
Count
Source
235
4.39k
{
236
4.39k
  gpointer *ptr = (gpointer *) pp;
237
4.39k
  gpointer ref;
238
239
4.39k
  ref = *ptr;
240
4.39k
  *ptr = NULL;
241
242
4.39k
  return ref;
243
4.39k
}
fu-efi-hard-drive-device-path.c:g_steal_pointer
Line
Count
Source
235
385
{
236
385
  gpointer *ptr = (gpointer *) pp;
237
385
  gpointer ref;
238
239
385
  ref = *ptr;
240
385
  *ptr = NULL;
241
242
385
  return ref;
243
385
}
fu-efi-load-option.c:g_steal_pointer
Line
Count
Source
235
1.59k
{
236
1.59k
  gpointer *ptr = (gpointer *) pp;
237
1.59k
  gpointer ref;
238
239
1.59k
  ref = *ptr;
240
1.59k
  *ptr = NULL;
241
242
1.59k
  return ref;
243
1.59k
}
Unexecuted instantiation: fu-efi-signature.c:g_steal_pointer
Unexecuted instantiation: fu-efi-signature-list.c:g_steal_pointer
fu-efi-vss2-variable-store.c:g_steal_pointer
Line
Count
Source
235
468
{
236
468
  gpointer *ptr = (gpointer *) pp;
237
468
  gpointer ref;
238
239
468
  ref = *ptr;
240
468
  *ptr = NULL;
241
242
468
  return ref;
243
468
}
fu-efi-vss-auth-variable.c:g_steal_pointer
Line
Count
Source
235
1.94k
{
236
1.94k
  gpointer *ptr = (gpointer *) pp;
237
1.94k
  gpointer ref;
238
239
1.94k
  ref = *ptr;
240
1.94k
  *ptr = NULL;
241
242
1.94k
  return ref;
243
1.94k
}
fu-efi-ftw-store.c:g_steal_pointer
Line
Count
Source
235
299
{
236
299
  gpointer *ptr = (gpointer *) pp;
237
299
  gpointer ref;
238
239
299
  ref = *ptr;
240
299
  *ptr = NULL;
241
242
299
  return ref;
243
299
}
Unexecuted instantiation: fu-efivars.c:g_steal_pointer
Unexecuted instantiation: fu-efi-x509-signature.c:g_steal_pointer
fu-elf-firmware.c:g_steal_pointer
Line
Count
Source
235
1.19M
{
236
1.19M
  gpointer *ptr = (gpointer *) pp;
237
1.19M
  gpointer ref;
238
239
1.19M
  ref = *ptr;
240
1.19M
  *ptr = NULL;
241
242
1.19M
  return ref;
243
1.19M
}
fu-fdt-firmware.c:g_steal_pointer
Line
Count
Source
235
3.74k
{
236
3.74k
  gpointer *ptr = (gpointer *) pp;
237
3.74k
  gpointer ref;
238
239
3.74k
  ref = *ptr;
240
3.74k
  *ptr = NULL;
241
242
3.74k
  return ref;
243
3.74k
}
Unexecuted instantiation: fu-fdt-image.c:g_steal_pointer
fu-firmware.c:g_steal_pointer
Line
Count
Source
235
426k
{
236
426k
  gpointer *ptr = (gpointer *) pp;
237
426k
  gpointer ref;
238
239
426k
  ref = *ptr;
240
426k
  *ptr = NULL;
241
242
426k
  return ref;
243
426k
}
Unexecuted instantiation: fu-firmware-common.c:g_steal_pointer
Unexecuted instantiation: fu-fit-firmware.c:g_steal_pointer
fu-fmap-firmware.c:g_steal_pointer
Line
Count
Source
235
1.25k
{
236
1.25k
  gpointer *ptr = (gpointer *) pp;
237
1.25k
  gpointer ref;
238
239
1.25k
  ref = *ptr;
240
1.25k
  *ptr = NULL;
241
242
1.25k
  return ref;
243
1.25k
}
Unexecuted instantiation: fu-fuzzer.c:g_steal_pointer
Unexecuted instantiation: fu-ginput-stream-adapter.c:g_steal_pointer
fu-hid-descriptor.c:g_steal_pointer
Line
Count
Source
235
925
{
236
925
  gpointer *ptr = (gpointer *) pp;
237
925
  gpointer ref;
238
239
925
  ref = *ptr;
240
925
  *ptr = NULL;
241
242
925
  return ref;
243
925
}
fu-hid-report-item.c:g_steal_pointer
Line
Count
Source
235
5.75k
{
236
5.75k
  gpointer *ptr = (gpointer *) pp;
237
5.75k
  gpointer ref;
238
239
5.75k
  ref = *ptr;
240
5.75k
  *ptr = NULL;
241
242
5.75k
  return ref;
243
5.75k
}
Unexecuted instantiation: fu-hid-report.c:g_steal_pointer
Unexecuted instantiation: fu-hwids.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-config.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-dmi.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-fdt.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-kenv.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-darwin.c:g_steal_pointer
Unexecuted instantiation: fu-hwids-smbios.c:g_steal_pointer
Unexecuted instantiation: fu-ifd-bios.c:g_steal_pointer
fu-ifd-firmware.c:g_steal_pointer
Line
Count
Source
235
1.24k
{
236
1.24k
  gpointer *ptr = (gpointer *) pp;
237
1.24k
  gpointer ref;
238
239
1.24k
  ref = *ptr;
240
1.24k
  *ptr = NULL;
241
242
1.24k
  return ref;
243
1.24k
}
fu-ifd-image.c:g_steal_pointer
Line
Count
Source
235
1.77k
{
236
1.77k
  gpointer *ptr = (gpointer *) pp;
237
1.77k
  gpointer ref;
238
239
1.77k
  ref = *ptr;
240
1.77k
  *ptr = NULL;
241
242
1.77k
  return ref;
243
1.77k
}
fu-ifwi-cpd-firmware.c:g_steal_pointer
Line
Count
Source
235
128
{
236
128
  gpointer *ptr = (gpointer *) pp;
237
128
  gpointer ref;
238
239
128
  ref = *ptr;
240
128
  *ptr = NULL;
241
242
128
  return ref;
243
128
}
Unexecuted instantiation: fu-ifwi-cpd-image.c:g_steal_pointer
fu-ifwi-fpt-firmware.c:g_steal_pointer
Line
Count
Source
235
57
{
236
57
  gpointer *ptr = (gpointer *) pp;
237
57
  gpointer ref;
238
239
57
  ref = *ptr;
240
57
  *ptr = NULL;
241
242
57
  return ref;
243
57
}
fu-ihex-firmware.c:g_steal_pointer
Line
Count
Source
235
642k
{
236
642k
  gpointer *ptr = (gpointer *) pp;
237
642k
  gpointer ref;
238
239
642k
  ref = *ptr;
240
642k
  *ptr = NULL;
241
242
642k
  return ref;
243
642k
}
fu-input-stream.c:g_steal_pointer
Line
Count
Source
235
13.2M
{
236
13.2M
  gpointer *ptr = (gpointer *) pp;
237
13.2M
  gpointer ref;
238
239
13.2M
  ref = *ptr;
240
13.2M
  *ptr = NULL;
241
242
13.2M
  return ref;
243
13.2M
}
Unexecuted instantiation: fu-intel-me-device.c:g_steal_pointer
fu-intel-thunderbolt-firmware.c:g_steal_pointer
Line
Count
Source
235
88
{
236
88
  gpointer *ptr = (gpointer *) pp;
237
88
  gpointer ref;
238
239
88
  ref = *ptr;
240
88
  *ptr = NULL;
241
242
88
  return ref;
243
88
}
fu-intel-thunderbolt-nvm.c:g_steal_pointer
Line
Count
Source
235
88
{
236
88
  gpointer *ptr = (gpointer *) pp;
237
88
  gpointer ref;
238
239
88
  ref = *ptr;
240
88
  *ptr = NULL;
241
242
88
  return ref;
243
88
}
Unexecuted instantiation: fu-io-channel.c:g_steal_pointer
Unexecuted instantiation: fu-ioctl.c:g_steal_pointer
fu-json-firmware.c:g_steal_pointer
Line
Count
Source
235
107
{
236
107
  gpointer *ptr = (gpointer *) pp;
237
107
  gpointer ref;
238
239
107
  ref = *ptr;
240
107
  *ptr = NULL;
241
242
107
  return ref;
243
107
}
Unexecuted instantiation: fu-json-parser.c:g_steal_pointer
Unexecuted instantiation: fu-kenv.c:g_steal_pointer
Unexecuted instantiation: fu-kernel.c:g_steal_pointer
Unexecuted instantiation: fu-kernel-search-path.c:g_steal_pointer
Unexecuted instantiation: fu-linear-firmware.c:g_steal_pointer
Unexecuted instantiation: fu-lzma-common.c:g_steal_pointer
fu-mem.c:g_steal_pointer
Line
Count
Source
235
416k
{
236
416k
  gpointer *ptr = (gpointer *) pp;
237
416k
  gpointer ref;
238
239
416k
  ref = *ptr;
240
416k
  *ptr = NULL;
241
242
416k
  return ref;
243
416k
}
fu-oprom-firmware.c:g_steal_pointer
Line
Count
Source
235
741
{
236
741
  gpointer *ptr = (gpointer *) pp;
237
741
  gpointer ref;
238
239
741
  ref = *ptr;
240
741
  *ptr = NULL;
241
242
741
  return ref;
243
741
}
fu-partial-input-stream.c:g_steal_pointer
Line
Count
Source
235
1.60M
{
236
1.60M
  gpointer *ptr = (gpointer *) pp;
237
1.60M
  gpointer ref;
238
239
1.60M
  ref = *ptr;
240
1.60M
  *ptr = NULL;
241
242
1.60M
  return ref;
243
1.60M
}
Unexecuted instantiation: fu-path.c:g_steal_pointer
Unexecuted instantiation: fu-path-store.c:g_steal_pointer
fu-pefile-firmware.c:g_steal_pointer
Line
Count
Source
235
8.68k
{
236
8.68k
  gpointer *ptr = (gpointer *) pp;
237
8.68k
  gpointer ref;
238
239
8.68k
  ref = *ptr;
240
8.68k
  *ptr = NULL;
241
242
8.68k
  return ref;
243
8.68k
}
fu-protobuf.c:g_steal_pointer
Line
Count
Source
235
255
{
236
255
  gpointer *ptr = (gpointer *) pp;
237
255
  gpointer ref;
238
239
255
  ref = *ptr;
240
255
  *ptr = NULL;
241
242
255
  return ref;
243
255
}
Unexecuted instantiation: fu-output-stream.c:g_steal_pointer
Unexecuted instantiation: fu-progress.c:g_steal_pointer
Unexecuted instantiation: fu-quirks.c:g_steal_pointer
fu-sbatlevel-section.c:g_steal_pointer
Line
Count
Source
235
11
{
236
11
  gpointer *ptr = (gpointer *) pp;
237
11
  gpointer ref;
238
239
11
  ref = *ptr;
240
11
  *ptr = NULL;
241
242
11
  return ref;
243
11
}
Unexecuted instantiation: fu-secure-bytes.c:g_steal_pointer
Unexecuted instantiation: fu-security-attr.c:g_steal_pointer
Unexecuted instantiation: fu-security-attrs.c:g_steal_pointer
Unexecuted instantiation: fu-smbios.c:g_steal_pointer
fu-srec-firmware.c:g_steal_pointer
Line
Count
Source
235
1.06M
{
236
1.06M
  gpointer *ptr = (gpointer *) pp;
237
1.06M
  gpointer ref;
238
239
1.06M
  ref = *ptr;
240
1.06M
  *ptr = NULL;
241
242
1.06M
  return ref;
243
1.06M
}
fu-string.c:g_steal_pointer
Line
Count
Source
235
164k
{
236
164k
  gpointer *ptr = (gpointer *) pp;
237
164k
  gpointer ref;
238
239
164k
  ref = *ptr;
240
164k
  *ptr = NULL;
241
242
164k
  return ref;
243
164k
}
Unexecuted instantiation: fu-sum.c:g_steal_pointer
Unexecuted instantiation: fu-temporary-directory.c:g_steal_pointer
Unexecuted instantiation: fu-tpm-eventlog-item.c:g_steal_pointer
Unexecuted instantiation: fu-tpm-eventlog.c:g_steal_pointer
fu-tpm-eventlog-v1.c:g_steal_pointer
Line
Count
Source
235
87
{
236
87
  gpointer *ptr = (gpointer *) pp;
237
87
  gpointer ref;
238
239
87
  ref = *ptr;
240
87
  *ptr = NULL;
241
242
87
  return ref;
243
87
}
fu-tpm-eventlog-v2.c:g_steal_pointer
Line
Count
Source
235
4.01k
{
236
4.01k
  gpointer *ptr = (gpointer *) pp;
237
4.01k
  gpointer ref;
238
239
4.01k
  ref = *ptr;
240
4.01k
  *ptr = NULL;
241
242
4.01k
  return ref;
243
4.01k
}
Unexecuted instantiation: fu-udev-device.c:g_steal_pointer
Unexecuted instantiation: fu-usb-bos-descriptor.c:g_steal_pointer
Unexecuted instantiation: fu-usb-config-descriptor.c:g_steal_pointer
Unexecuted instantiation: fu-usb-descriptor.c:g_steal_pointer
fu-usb-device.c:g_steal_pointer
Line
Count
Source
235
282k
{
236
282k
  gpointer *ptr = (gpointer *) pp;
237
282k
  gpointer ref;
238
239
282k
  ref = *ptr;
240
282k
  *ptr = NULL;
241
242
282k
  return ref;
243
282k
}
Unexecuted instantiation: fu-usb-device-ds20.c:g_steal_pointer
Unexecuted instantiation: fu-usb-device-fw-ds20.c:g_steal_pointer
Unexecuted instantiation: fu-usb-device-ms-ds20.c:g_steal_pointer
Unexecuted instantiation: fu-usb-endpoint.c:g_steal_pointer
Unexecuted instantiation: fu-usb-hid-descriptor.c:g_steal_pointer
Unexecuted instantiation: fu-usb-interface.c:g_steal_pointer
Unexecuted instantiation: fu-uswid-firmware.c:g_steal_pointer
Unexecuted instantiation: fu-version-common.c:g_steal_pointer
Unexecuted instantiation: fu-volume.c:g_steal_pointer
Unexecuted instantiation: fu-volume-locker.c:g_steal_pointer
Unexecuted instantiation: fu-x509-certificate.c:g_steal_pointer
Unexecuted instantiation: fu-xor.c:g_steal_pointer
fu-zip-firmware.c:g_steal_pointer
Line
Count
Source
235
10.3k
{
236
10.3k
  gpointer *ptr = (gpointer *) pp;
237
10.3k
  gpointer ref;
238
239
10.3k
  ref = *ptr;
240
10.3k
  *ptr = NULL;
241
242
10.3k
  return ref;
243
10.3k
}
Unexecuted instantiation: fu-zip-file.c:g_steal_pointer
Unexecuted instantiation: fu-common-linux.c:g_steal_pointer
Unexecuted instantiation: fu-darwin-efivars.c:g_steal_pointer
Unexecuted instantiation: fu-fuzzer-firmware.c:g_steal_pointer
Unexecuted instantiation: xb-builder.c:g_steal_pointer
Unexecuted instantiation: xb-builder-fixup.c:g_steal_pointer
xb-builder-node.c:g_steal_pointer
Line
Count
Source
235
164k
{
236
164k
  gpointer *ptr = (gpointer *) pp;
237
164k
  gpointer ref;
238
239
164k
  ref = *ptr;
240
164k
  *ptr = NULL;
241
242
164k
  return ref;
243
164k
}
Unexecuted instantiation: xb-builder-source.c:g_steal_pointer
Unexecuted instantiation: xb-builder-source-ctx.c:g_steal_pointer
Unexecuted instantiation: xb-common.c:g_steal_pointer
Unexecuted instantiation: xb-node.c:g_steal_pointer
Unexecuted instantiation: xb-node-query.c:g_steal_pointer
Unexecuted instantiation: xb-query.c:g_steal_pointer
Unexecuted instantiation: xb-query-context.c:g_steal_pointer
Unexecuted instantiation: xb-silo.c:g_steal_pointer
Unexecuted instantiation: xb-silo-export.c:g_steal_pointer
Unexecuted instantiation: xb-silo-query.c:g_steal_pointer
Unexecuted instantiation: xb-stack.c:g_steal_pointer
Unexecuted instantiation: xb-string.c:g_steal_pointer
Unexecuted instantiation: xb-value-bindings.c:g_steal_pointer
Unexecuted instantiation: xb-version.c:g_steal_pointer
Unexecuted instantiation: xb-zstd-decompressor.c:g_steal_pointer
Unexecuted instantiation: xb-lzma-decompressor.c:g_steal_pointer
Unexecuted instantiation: xb-machine.c:g_steal_pointer
Unexecuted instantiation: xb-opcode.c:g_steal_pointer
fu-ccgx-struct.c:g_steal_pointer
Line
Count
Source
235
431
{
236
431
  gpointer *ptr = (gpointer *) pp;
237
431
  gpointer ref;
238
239
431
  ref = *ptr;
240
431
  *ptr = NULL;
241
242
431
  return ref;
243
431
}
Unexecuted instantiation: fu-ccgx-pure-hid-struct.c:g_steal_pointer
Unexecuted instantiation: fu-ccgx-common.c:g_steal_pointer
fu-ccgx-firmware.c:g_steal_pointer
Line
Count
Source
235
754k
{
236
754k
  gpointer *ptr = (gpointer *) pp;
237
754k
  gpointer ref;
238
239
754k
  ref = *ptr;
240
754k
  *ptr = NULL;
241
242
754k
  return ref;
243
754k
}
fu-genesys-usbhub-struct.c:g_steal_pointer
Line
Count
Source
235
699
{
236
699
  gpointer *ptr = (gpointer *) pp;
237
699
  gpointer ref;
238
239
699
  ref = *ptr;
240
699
  *ptr = NULL;
241
242
699
  return ref;
243
699
}
fu-genesys-scaler-firmware.c:g_steal_pointer
Line
Count
Source
235
118
{
236
118
  gpointer *ptr = (gpointer *) pp;
237
118
  gpointer ref;
238
239
118
  ref = *ptr;
240
118
  *ptr = NULL;
241
242
118
  return ref;
243
118
}
fu-genesys-usbhub-firmware.c:g_steal_pointer
Line
Count
Source
235
58
{
236
58
  gpointer *ptr = (gpointer *) pp;
237
58
  gpointer ref;
238
239
58
  ref = *ptr;
240
58
  *ptr = NULL;
241
242
58
  return ref;
243
58
}
Unexecuted instantiation: fu-genesys-usbhub-dev-firmware.c:g_steal_pointer
Unexecuted instantiation: fu-genesys-usbhub-pd-firmware.c:g_steal_pointer
Unexecuted instantiation: fu-genesys-usbhub-codesign-firmware.c:g_steal_pointer
Unexecuted instantiation: fu-cros-ec-struct.c:g_steal_pointer
Unexecuted instantiation: fu-cros-ec-common.c:g_steal_pointer
Unexecuted instantiation: fu-cros-ec-firmware.c:g_steal_pointer
fu-acpi-phat-struct.c:g_steal_pointer
Line
Count
Source
235
26.7k
{
236
26.7k
  gpointer *ptr = (gpointer *) pp;
237
26.7k
  gpointer ref;
238
239
26.7k
  ref = *ptr;
240
26.7k
  *ptr = NULL;
241
242
26.7k
  return ref;
243
26.7k
}
fu-acpi-phat.c:g_steal_pointer
Line
Count
Source
235
441
{
236
441
  gpointer *ptr = (gpointer *) pp;
237
441
  gpointer ref;
238
239
441
  ref = *ptr;
240
441
  *ptr = NULL;
241
242
441
  return ref;
243
441
}
fu-acpi-phat-health-record.c:g_steal_pointer
Line
Count
Source
235
879
{
236
879
  gpointer *ptr = (gpointer *) pp;
237
879
  gpointer ref;
238
239
879
  ref = *ptr;
240
879
  *ptr = NULL;
241
242
879
  return ref;
243
879
}
fu-acpi-phat-version-element.c:g_steal_pointer
Line
Count
Source
235
2.17k
{
236
2.17k
  gpointer *ptr = (gpointer *) pp;
237
2.17k
  gpointer ref;
238
239
2.17k
  ref = *ptr;
240
2.17k
  *ptr = NULL;
241
242
2.17k
  return ref;
243
2.17k
}
fu-acpi-phat-version-record.c:g_steal_pointer
Line
Count
Source
235
4.90k
{
236
4.90k
  gpointer *ptr = (gpointer *) pp;
237
4.90k
  gpointer ref;
238
239
4.90k
  ref = *ptr;
240
4.90k
  *ptr = NULL;
241
242
4.90k
  return ref;
243
4.90k
}
Unexecuted instantiation: fu-pixart-rf-struct.c:g_steal_pointer
Unexecuted instantiation: fu-pixart-rf-common.c:g_steal_pointer
fu-pixart-rf-firmware.c:g_steal_pointer
Line
Count
Source
235
81
{
236
81
  gpointer *ptr = (gpointer *) pp;
237
81
  gpointer ref;
238
239
81
  ref = *ptr;
240
81
  *ptr = NULL;
241
242
81
  return ref;
243
81
}
fu-ebitdo-struct.c:g_steal_pointer
Line
Count
Source
235
187
{
236
187
  gpointer *ptr = (gpointer *) pp;
237
187
  gpointer ref;
238
239
187
  ref = *ptr;
240
187
  *ptr = NULL;
241
242
187
  return ref;
243
187
}
fu-ebitdo-firmware.c:g_steal_pointer
Line
Count
Source
235
89
{
236
89
  gpointer *ptr = (gpointer *) pp;
237
89
  gpointer ref;
238
239
89
  ref = *ptr;
240
89
  *ptr = NULL;
241
242
89
  return ref;
243
89
}
fu-realtek-alc408x-struct.c:g_steal_pointer
Line
Count
Source
235
2
{
236
2
  gpointer *ptr = (gpointer *) pp;
237
2
  gpointer ref;
238
239
2
  ref = *ptr;
240
2
  *ptr = NULL;
241
242
2
  return ref;
243
2
}
Unexecuted instantiation: fu-realtek-alc408x-common.c:g_steal_pointer
fu-realtek-alc408x-firmware.c:g_steal_pointer
Line
Count
Source
235
1
{
236
1
  gpointer *ptr = (gpointer *) pp;
237
1
  gpointer ref;
238
239
1
  ref = *ptr;
240
1
  *ptr = NULL;
241
242
1
  return ref;
243
1
}
fu-uf2-struct.c:g_steal_pointer
Line
Count
Source
235
11.7k
{
236
11.7k
  gpointer *ptr = (gpointer *) pp;
237
11.7k
  gpointer ref;
238
239
11.7k
  ref = *ptr;
240
11.7k
  *ptr = NULL;
241
242
11.7k
  return ref;
243
11.7k
}
fu-uf2-firmware.c:g_steal_pointer
Line
Count
Source
235
1.65k
{
236
1.65k
  gpointer *ptr = (gpointer *) pp;
237
1.65k
  gpointer ref;
238
239
1.65k
  ref = *ptr;
240
1.65k
  *ptr = NULL;
241
242
1.65k
  return ref;
243
1.65k
}
fu-amd-afc-struct.c:g_steal_pointer
Line
Count
Source
235
198k
{
236
198k
  gpointer *ptr = (gpointer *) pp;
237
198k
  gpointer ref;
238
239
198k
  ref = *ptr;
240
198k
  *ptr = NULL;
241
242
198k
  return ref;
243
198k
}
Unexecuted instantiation: fu-amd-afc-acpi-table.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-bios-setting.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-config-entry.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-config.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-form.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-option.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-pending.c:g_steal_pointer
Unexecuted instantiation: fu-amd-afc-setting.c:g_steal_pointer
fu-amd-afc-state.c:g_steal_pointer
Line
Count
Source
235
73.7k
{
236
73.7k
  gpointer *ptr = (gpointer *) pp;
237
73.7k
  gpointer ref;
238
239
73.7k
  ref = *ptr;
240
73.7k
  *ptr = NULL;
241
242
73.7k
  return ref;
243
73.7k
}
Unexecuted instantiation: fu-amd-afc-varstore.c:g_steal_pointer
Unexecuted instantiation: fu-hughski-colorhug-struct.c:g_steal_pointer
Unexecuted instantiation: fu-hughski-colorhug-device.c:g_steal_pointer
Unexecuted instantiation: fu-wacom-usb-struct.c:g_steal_pointer
fu-wacom-usb-firmware.c:g_steal_pointer
Line
Count
Source
235
2.97k
{
236
2.97k
  gpointer *ptr = (gpointer *) pp;
237
2.97k
  gpointer ref;
238
239
2.97k
  ref = *ptr;
240
2.97k
  *ptr = NULL;
241
242
2.97k
  return ref;
243
2.97k
}
fu-elantp-struct.c:g_steal_pointer
Line
Count
Source
235
279
{
236
279
  gpointer *ptr = (gpointer *) pp;
237
279
  gpointer ref;
238
239
279
  ref = *ptr;
240
279
  *ptr = NULL;
241
242
279
  return ref;
243
279
}
fu-elantp-firmware.c:g_steal_pointer
Line
Count
Source
235
191
{
236
191
  gpointer *ptr = (gpointer *) pp;
237
191
  gpointer ref;
238
239
191
  ref = *ptr;
240
191
  *ptr = NULL;
241
242
191
  return ref;
243
191
}
fu-redfish-struct.c:g_steal_pointer
Line
Count
Source
235
2.91k
{
236
2.91k
  gpointer *ptr = (gpointer *) pp;
237
2.91k
  gpointer ref;
238
239
2.91k
  ref = *ptr;
240
2.91k
  *ptr = NULL;
241
242
2.91k
  return ref;
243
2.91k
}
Unexecuted instantiation: fu-redfish-common.c:g_steal_pointer
fu-redfish-smbios.c:g_steal_pointer
Line
Count
Source
235
48
{
236
48
  gpointer *ptr = (gpointer *) pp;
237
48
  gpointer ref;
238
239
48
  ref = *ptr;
240
48
  *ptr = NULL;
241
242
48
  return ref;
243
48
}
Unexecuted instantiation: fu-elanfp-struct.c:g_steal_pointer
fu-elanfp-firmware.c:g_steal_pointer
Line
Count
Source
235
102
{
236
102
  gpointer *ptr = (gpointer *) pp;
237
102
  gpointer ref;
238
239
102
  ref = *ptr;
240
102
  *ptr = NULL;
241
242
102
  return ref;
243
102
}
fu-synaptics-prometheus-struct.c:g_steal_pointer
Line
Count
Source
235
3.99k
{
236
3.99k
  gpointer *ptr = (gpointer *) pp;
237
3.99k
  gpointer ref;
238
239
3.99k
  ref = *ptr;
240
3.99k
  *ptr = NULL;
241
242
3.99k
  return ref;
243
3.99k
}
fu-synaptics-prometheus-firmware.c:g_steal_pointer
Line
Count
Source
235
150
{
236
150
  gpointer *ptr = (gpointer *) pp;
237
150
  gpointer ref;
238
239
150
  ref = *ptr;
240
150
  *ptr = NULL;
241
242
150
  return ref;
243
150
}
fu-synaptics-mst-struct.c:g_steal_pointer
Line
Count
Source
235
271
{
236
271
  gpointer *ptr = (gpointer *) pp;
237
271
  gpointer ref;
238
239
271
  ref = *ptr;
240
271
  *ptr = NULL;
241
242
271
  return ref;
243
271
}
fu-synaptics-mst-firmware.c:g_steal_pointer
Line
Count
Source
235
71
{
236
71
  gpointer *ptr = (gpointer *) pp;
237
71
  gpointer ref;
238
239
71
  ref = *ptr;
240
71
  *ptr = NULL;
241
242
71
  return ref;
243
71
}
fu-ccgx-dmc-struct.c:g_steal_pointer
Line
Count
Source
235
15.5k
{
236
15.5k
  gpointer *ptr = (gpointer *) pp;
237
15.5k
  gpointer ref;
238
239
15.5k
  ref = *ptr;
240
15.5k
  *ptr = NULL;
241
242
15.5k
  return ref;
243
15.5k
}
fu-ccgx-dmc-firmware.c:g_steal_pointer
Line
Count
Source
235
300k
{
236
300k
  gpointer *ptr = (gpointer *) pp;
237
300k
  gpointer ref;
238
239
300k
  ref = *ptr;
240
300k
  *ptr = NULL;
241
242
300k
  return ref;
243
300k
}
fu-synaptics-rmi-struct.c:g_steal_pointer
Line
Count
Source
235
43.0k
{
236
43.0k
  gpointer *ptr = (gpointer *) pp;
237
43.0k
  gpointer ref;
238
239
43.0k
  ref = *ptr;
240
43.0k
  *ptr = NULL;
241
242
43.0k
  return ref;
243
43.0k
}
Unexecuted instantiation: fu-synaptics-rmi-common.c:g_steal_pointer
fu-synaptics-rmi-firmware.c:g_steal_pointer
Line
Count
Source
235
78
{
236
78
  gpointer *ptr = (gpointer *) pp;
237
78
  gpointer ref;
238
239
78
  ref = *ptr;
240
78
  *ptr = NULL;
241
242
78
  return ref;
243
78
}
fu-bcm57xx-struct.c:g_steal_pointer
Line
Count
Source
235
2.81k
{
236
2.81k
  gpointer *ptr = (gpointer *) pp;
237
2.81k
  gpointer ref;
238
239
2.81k
  ref = *ptr;
240
2.81k
  *ptr = NULL;
241
242
2.81k
  return ref;
243
2.81k
}
fu-bcm57xx-common.c:g_steal_pointer
Line
Count
Source
235
60
{
236
60
  gpointer *ptr = (gpointer *) pp;
237
60
  gpointer ref;
238
239
60
  ref = *ptr;
240
60
  *ptr = NULL;
241
242
60
  return ref;
243
60
}
fu-bcm57xx-dict-image.c:g_steal_pointer
Line
Count
Source
235
637
{
236
637
  gpointer *ptr = (gpointer *) pp;
237
637
  gpointer ref;
238
239
637
  ref = *ptr;
240
637
  *ptr = NULL;
241
242
637
  return ref;
243
637
}
fu-bcm57xx-firmware.c:g_steal_pointer
Line
Count
Source
235
2.60k
{
236
2.60k
  gpointer *ptr = (gpointer *) pp;
237
2.60k
  gpointer ref;
238
239
2.60k
  ref = *ptr;
240
2.60k
  *ptr = NULL;
241
242
2.60k
  return ref;
243
2.60k
}
fu-bcm57xx-stage1-image.c:g_steal_pointer
Line
Count
Source
235
140
{
236
140
  gpointer *ptr = (gpointer *) pp;
237
140
  gpointer ref;
238
239
140
  ref = *ptr;
240
140
  *ptr = NULL;
241
242
140
  return ref;
243
140
}
fu-bcm57xx-stage2-image.c:g_steal_pointer
Line
Count
Source
235
140
{
236
140
  gpointer *ptr = (gpointer *) pp;
237
140
  gpointer ref;
238
239
140
  ref = *ptr;
240
140
  *ptr = NULL;
241
242
140
  return ref;
243
140
}
244
245
/* type safety */
246
#if defined(glib_typeof) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58
247
32.4M
#define g_steal_pointer(pp) ((glib_typeof (*pp)) (g_steal_pointer) (pp))
248
#else  /* __GNUC__ */
249
/* This version does not depend on gcc extensions, but gcc does not warn
250
 * about incompatible-pointer-types: */
251
#define g_steal_pointer(pp) \
252
  (0 ? (*(pp)) : (g_steal_pointer) (pp))
253
#endif /* __GNUC__ */
254
255
/* Optimise: avoid the call to the (slower) _n function if we can
256
 * determine at compile-time that no overflow happens.
257
 */
258
#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__)
259
#  define _G_NEW(struct_type, n_structs, func) \
260
14.8M
  (struct_type *) (G_GNUC_EXTENSION ({     \
261
14.8M
    gsize __n = (gsize) (n_structs);      \
262
14.8M
    gsize __s = sizeof (struct_type);     \
263
14.8M
    gpointer __p;           \
264
14.8M
    if (__s == 1)           \
265
14.8M
      __p = g_##func (__n);       \
266
14.8M
    else if (__builtin_constant_p (__n) &&   \
267
14.8M
             (__s == 0 || __n <= G_MAXSIZE / __s)) \
268
14.8M
      __p = g_##func (__n * __s);       \
269
14.8M
    else              \
270
14.8M
      __p = g_##func##_n (__n, __s);     \
271
14.8M
    __p;              \
272
14.8M
  }))
273
#  define _G_RENEW(struct_type, mem, n_structs, func) \
274
  (struct_type *) (G_GNUC_EXTENSION ({      \
275
    gsize __n = (gsize) (n_structs);      \
276
    gsize __s = sizeof (struct_type);     \
277
    gpointer __p = (gpointer) (mem);      \
278
    if (__s == 1)           \
279
      __p = g_##func (__p, __n);        \
280
    else if (__builtin_constant_p (__n) &&    \
281
             (__s == 0 || __n <= G_MAXSIZE / __s))  \
282
      __p = g_##func (__p, __n * __s);      \
283
    else              \
284
      __p = g_##func##_n (__p, __n, __s);     \
285
    __p;              \
286
  }))
287
288
#else
289
290
/* Unoptimised version: always call the _n() function. */
291
292
#define _G_NEW(struct_type, n_structs, func) \
293
        ((struct_type *) g_##func##_n ((n_structs), sizeof (struct_type)))
294
#define _G_RENEW(struct_type, mem, n_structs, func) \
295
        ((struct_type *) g_##func##_n (mem, (n_structs), sizeof (struct_type)))
296
297
#endif
298
299
/**
300
 * g_new:
301
 * @struct_type: the type of the elements to allocate
302
 * @n_structs: the number of elements to allocate
303
 * 
304
 * Allocates @n_structs elements of type @struct_type.
305
 * The returned pointer is cast to a pointer to the given type.
306
 * If @n_structs is 0 it returns %NULL.
307
 * Care is taken to avoid overflow when calculating the size of the allocated block.
308
 * 
309
 * Since the returned pointer is already casted to the right type,
310
 * it is normally unnecessary to cast it explicitly, and doing
311
 * so might hide memory allocation errors.
312
 * 
313
 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
314
 */
315
780
#define g_new(struct_type, n_structs)     _G_NEW (struct_type, n_structs, malloc)
316
/**
317
 * g_new0:
318
 * @struct_type: the type of the elements to allocate.
319
 * @n_structs: the number of elements to allocate.
320
 * 
321
 * Allocates @n_structs elements of type @struct_type, initialized to 0's.
322
 * The returned pointer is cast to a pointer to the given type.
323
 * If @n_structs is 0 it returns %NULL.
324
 * Care is taken to avoid overflow when calculating the size of the allocated block.
325
 * 
326
 * Since the returned pointer is already casted to the right type,
327
 * it is normally unnecessary to cast it explicitly, and doing
328
 * so might hide memory allocation errors.
329
 * 
330
 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type.
331
 */
332
14.8M
#define g_new0(struct_type, n_structs)      _G_NEW (struct_type, n_structs, malloc0)
333
/**
334
 * g_renew:
335
 * @struct_type: the type of the elements to allocate
336
 * @mem: the currently allocated memory
337
 * @n_structs: the number of elements to allocate
338
 * 
339
 * Reallocates the memory pointed to by @mem, so that it now has space for
340
 * @n_structs elements of type @struct_type. It returns the new address of
341
 * the memory, which may have been moved.
342
 * Care is taken to avoid overflow when calculating the size of the allocated block.
343
 * 
344
 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
345
 */
346
#define g_renew(struct_type, mem, n_structs)    _G_RENEW (struct_type, mem, n_structs, realloc)
347
/**
348
 * g_try_new:
349
 * @struct_type: the type of the elements to allocate
350
 * @n_structs: the number of elements to allocate
351
 * 
352
 * Attempts to allocate @n_structs elements of type @struct_type, and returns
353
 * %NULL on failure. Contrast with g_new(), which aborts the program on failure.
354
 * The returned pointer is cast to a pointer to the given type.
355
 * The function returns %NULL when @n_structs is 0 of if an overflow occurs.
356
 * 
357
 * Since: 2.8
358
 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
359
 */
360
#define g_try_new(struct_type, n_structs)   _G_NEW (struct_type, n_structs, try_malloc)
361
/**
362
 * g_try_new0:
363
 * @struct_type: the type of the elements to allocate
364
 * @n_structs: the number of elements to allocate
365
 * 
366
 * Attempts to allocate @n_structs elements of type @struct_type, initialized
367
 * to 0's, and returns %NULL on failure. Contrast with g_new0(), which aborts
368
 * the program on failure.
369
 * The returned pointer is cast to a pointer to the given type.
370
 * The function returns %NULL when @n_structs is 0 or if an overflow occurs.
371
 * 
372
 * Since: 2.8
373
 * Returns: a pointer to the allocated memory, cast to a pointer to @struct_type
374
 */
375
#define g_try_new0(struct_type, n_structs)    _G_NEW (struct_type, n_structs, try_malloc0)
376
/**
377
 * g_try_renew:
378
 * @struct_type: the type of the elements to allocate
379
 * @mem: the currently allocated memory
380
 * @n_structs: the number of elements to allocate
381
 * 
382
 * Attempts to reallocate the memory pointed to by @mem, so that it now has
383
 * space for @n_structs elements of type @struct_type, and returns %NULL on
384
 * failure. Contrast with g_renew(), which aborts the program on failure.
385
 * It returns the new address of the memory, which may have been moved.
386
 * The function returns %NULL if an overflow occurs.
387
 * 
388
 * Since: 2.8
389
 * Returns: a pointer to the new allocated memory, cast to a pointer to @struct_type
390
 */
391
#define g_try_renew(struct_type, mem, n_structs)  _G_RENEW (struct_type, mem, n_structs, try_realloc)
392
393
394
/* Memory allocation virtualization for debugging purposes
395
 * g_mem_set_vtable() has to be the very first GLib function called
396
 * if being used
397
 */
398
struct _GMemVTable {
399
  gpointer (*malloc)      (gsize    n_bytes);
400
  gpointer (*realloc)     (gpointer mem,
401
         gsize    n_bytes);
402
  void     (*free)        (gpointer mem);
403
  /* optional; set to NULL if not used ! */
404
  gpointer (*calloc)      (gsize    n_blocks,
405
         gsize    n_block_bytes);
406
  gpointer (*try_malloc)  (gsize    n_bytes);
407
  gpointer (*try_realloc) (gpointer mem,
408
         gsize    n_bytes);
409
};
410
GLIB_DEPRECATED_IN_2_46
411
void   g_mem_set_vtable (GMemVTable *vtable);
412
GLIB_DEPRECATED_IN_2_46
413
gboolean g_mem_is_system_malloc (void);
414
415
GLIB_VAR gboolean g_mem_gc_friendly;
416
417
/* Memory profiler and checker, has to be enabled via g_mem_set_vtable()
418
 */
419
GLIB_VAR GMemVTable *glib_mem_profiler_table;
420
GLIB_DEPRECATED_IN_2_46
421
void  g_mem_profile (void);
422
423
G_END_DECLS
424
425
#endif /* __G_MEM_H__ */