| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * rsrc_nonstatic.c -- Resource management routines for !SS_CAP_STATIC_MAP sockets |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 6 | | - * published by the Free Software Foundation. |
|---|
| 7 | 4 | * |
|---|
| 8 | 5 | * The initial developer of the original code is David A. Hinds |
|---|
| 9 | 6 | * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds |
|---|
| .. | .. |
|---|
| 1056 | 1053 | q = p->next; |
|---|
| 1057 | 1054 | kfree(p); |
|---|
| 1058 | 1055 | } |
|---|
| 1056 | + |
|---|
| 1057 | + kfree(data); |
|---|
| 1059 | 1058 | } |
|---|
| 1060 | 1059 | |
|---|
| 1061 | 1060 | |
|---|
| .. | .. |
|---|
| 1085 | 1084 | for (p = data->io_db.next; p != &data->io_db; p = p->next) { |
|---|
| 1086 | 1085 | if (ret > (PAGE_SIZE - 10)) |
|---|
| 1087 | 1086 | continue; |
|---|
| 1088 | | - ret += snprintf(&buf[ret], (PAGE_SIZE - ret - 1), |
|---|
| 1087 | + ret += scnprintf(&buf[ret], (PAGE_SIZE - ret - 1), |
|---|
| 1089 | 1088 | "0x%08lx - 0x%08lx\n", |
|---|
| 1090 | 1089 | ((unsigned long) p->base), |
|---|
| 1091 | 1090 | ((unsigned long) p->base + p->num - 1)); |
|---|
| .. | .. |
|---|
| 1142 | 1141 | p = p->next) { |
|---|
| 1143 | 1142 | if (ret > (PAGE_SIZE - 10)) |
|---|
| 1144 | 1143 | continue; |
|---|
| 1145 | | - ret += snprintf(&buf[ret], (PAGE_SIZE - ret - 1), |
|---|
| 1144 | + ret += scnprintf(&buf[ret], (PAGE_SIZE - ret - 1), |
|---|
| 1146 | 1145 | "0x%08lx - 0x%08lx\n", |
|---|
| 1147 | 1146 | ((unsigned long) p->base), |
|---|
| 1148 | 1147 | ((unsigned long) p->base + p->num - 1)); |
|---|
| .. | .. |
|---|
| 1151 | 1150 | for (p = data->mem_db.next; p != &data->mem_db; p = p->next) { |
|---|
| 1152 | 1151 | if (ret > (PAGE_SIZE - 10)) |
|---|
| 1153 | 1152 | continue; |
|---|
| 1154 | | - ret += snprintf(&buf[ret], (PAGE_SIZE - ret - 1), |
|---|
| 1153 | + ret += scnprintf(&buf[ret], (PAGE_SIZE - ret - 1), |
|---|
| 1155 | 1154 | "0x%08lx - 0x%08lx\n", |
|---|
| 1156 | 1155 | ((unsigned long) p->base), |
|---|
| 1157 | 1156 | ((unsigned long) p->base + p->num - 1)); |
|---|