Hey - don't get me wrong - once he was finally freed by Harry I think he was then acting under his own steam - and we have seen him become tremendously loyal to Harry - the question seems to surround before that ... and also SM made some great points to that effect ...Vold. E. Mort said:grr, all you Dobby haters! Dobby is Harry's friend and will be his friend at the end of book 7.
I think Dobby in his efforts from the start of CoS might have been under instruction from Malfoy - which then begs the question is perhaps his freedom a 'pre-agreed' price for his full assistance in the efforts?
I know you can argue he is a slave and has to do what he is told - but you get better results with co-operation rather than oppression!