diff options
| -rw-r--r-- | security/tomoyo/tomoyo.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index 9548a0984cc4..3f93bb91768b 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c | |||
| @@ -122,15 +122,7 @@ static char *tomoyo_sysctl_path(struct ctl_table *table) | |||
| 122 | *--end = '\0'; | 122 | *--end = '\0'; |
| 123 | buflen--; | 123 | buflen--; |
| 124 | while (table) { | 124 | while (table) { |
| 125 | char num[32]; | 125 | if (tomoyo_prepend(&end, &buflen, table->procname) || |
| 126 | const char *sp = table->procname; | ||
| 127 | |||
| 128 | if (!sp) { | ||
| 129 | memset(num, 0, sizeof(num)); | ||
| 130 | snprintf(num, sizeof(num) - 1, "=%d=", table->ctl_name); | ||
| 131 | sp = num; | ||
| 132 | } | ||
| 133 | if (tomoyo_prepend(&end, &buflen, sp) || | ||
| 134 | tomoyo_prepend(&end, &buflen, "/")) | 126 | tomoyo_prepend(&end, &buflen, "/")) |
| 135 | goto out; | 127 | goto out; |
| 136 | table = table->parent; | 128 | table = table->parent; |
