diff mbox

[13/21] dm: Move printing of dm_ioctl fields before allocation of extra data

Message ID 20161009133048.GA3769@obsidian (mailing list archive)
State Not Applicable, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Eugene Syromyatnikov Oct. 9, 2016, 1:30 p.m. UTC
---
 dm.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/dm.c b/dm.c
index a11196f..73a9b57 100644
--- a/dm.c
+++ b/dm.c
@@ -335,6 +335,10 @@  dm_known_ioctl(struct tcb *tcp, const unsigned int code, long arg)
 		goto skip;
 	}
 
+	dm_decode_device(code, ioc);
+	dm_decode_values(tcp, code, ioc);
+	dm_decode_flags(ioc);
+
 	if (ioc->data_size > sizeof(ioc)) {
 		extra = malloc(ioc->data_size);
 		if (extra) {
@@ -346,9 +350,6 @@  dm_known_ioctl(struct tcb *tcp, const unsigned int code, long arg)
 			}
 		}
 	}
-	dm_decode_device(code, ioc);
-	dm_decode_values(tcp, code, ioc);
-	dm_decode_flags(ioc);
 	if (abbrev(tcp))
 		tprints(", ...");
 	else